Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Twisted Probabilities, Uncerntainty, and Prices

This repository contains codes and jupyter notebooks which estimates and demonstrates results of the empirical model in "Twisted Probabilities, Uncerntainty, and Prices" by Lars Peter Hansen, Bálint Szőke and Lloyd S. Han and Thomas J. Sargent. Latest version could be found here.

File structures

  1. main.ipynb is a Python 3 based notebook producing interactive figures accompanying our paper
  2. single_capital.ipynb is a Julia notebook illustrating and demonstrating our code for solving our model in single capital stock case
  3. two_capitals.ipynb is a Julia notebook illustrating and demonstrating our code for solving our model in two capital stocks case We have a Binder for users to play with our notebook without setting up files on their local machine: Binder


This project simply requires the Anaconda distribution of Python version 3.6 and Julia 1.0 or higher versions. Additional dependencies and prerequisites are handled automatically in setup.

Installing and activating the environment

Navigate to the folder containing the code and set up the virtual environment necessarily to run our code

For Mac Users, please open the terminal and run the following commands in order

cd /path
git clone
cd Twisted

For Windows Users, please open command prompt (shortcut: Windows+R and type 'cmd')

cd /path
git clone
conda update conda
conda env create -f environment.yml
conda activate Twisted
cd Twisted

Please replace /path to user designated folder path in both cases.

Press y to proceed with installation when prompted. You will know that setup has been correctly implemented if the word (Twisted) contained in parenthesis appears on the current line of your terminal window.

Jupyter Notebook for Interactive Plots in the Paper

To run the notebook, simply use: (Make sure acitivating our virtual python environment "Twisted" and navigating to this folder)

jupyter notebook

Our notebook interface should show up in the browser and have fun playing with our notebooks!


No description, website, or topics provided.






No releases published


No packages published