Giter Club home page Giter Club logo

behavioral_heterogeneity's Introduction

Structural Estimation of Behavioral Heterogeneity

Zhentao Shi and Huanhuan Zheng (2018), "Structural Estimation of Behavioral Heterogeneity," Journal of Applied Econometrics [arxiv]

We provide code of XMM and ELXM that replicates the empirical results.

Hosts

  • A static copy is hosted at Journal of Applied Econometrics Data Archive.
  • A dynamic copy is hosted at Github with Version 1.0 exactly the same as the copy in JAE Data Archive. The authors will maintain it for future update.

Data

  • raw_data.csv: the raw dataset, downloaded from Robert Shiller's webpage. This paper only uses three columns of the dataset.
    • date: in the format year.month
    • p: S&P 500 index
    • D: Dividend

Code

  • master1_data_cleaning.R: generate the detrended time series for each period. After running this script, three Rdata files will be saved in the folder.
  • master2_estimation.R: estimation by XMM and ELXM using the Rdata files generated by master1_data_cleaning.R.

The following Rscripts contain the user-defined functions used in master2_estimation.R.

  • CUE.R: XMM
  • EL.R: EXLM
  • func5.R: a collection of useful functions for the estimation procedures.

Environment

  • No extra software is needed to run master1_data_cleaning.R.
  • The numerical optimization in master2_estimation.R depends on NLOPT and MOSEK via the R packages nloptr and RMOSEK. The software must be installed to run the code.

Implementation

  1. R --vanilla <master1_data_generation.R> data.out &
  2. R --vanilla <master2_estimation.R> est.out &

behavioral_heterogeneity's People

Contributors

zhentaoshi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.