Skip to content

lphansen/Twisted

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
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

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published