Skip to content
No description, website, or topics provided.
Python Julia Jupyter Notebook
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
code_new
data
README.md
environment.yml
figs_utils_new.py
main.ipynb
setup.sh
single_capital.ipynb
two_capitals.ipynb

README.md

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

Prerequisites

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 https://github.com/lphansen/Twisted.git
cd Twisted
source setup.sh

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

cd /path
git clone https://github.com/lphansen/Twisted.git
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!

You can’t perform that action at this time.