Git Product home page Git Product logo

asset_pricing's Introduction

Generative Adversarial Network (GAN) Model In Asset Pricing

This repo contains the Python code implementation for my undergraduate thesis paper. The paper empirically validated Chen et al. (2021)'s GAN model in the UK LSE 1998-2017 data.

Chen et al. (2021)'s GAN model implemented based on TensorFlow v1 can be found in their GitHub repo In this repo we implemented the model using TensorFlow v2.

Chen, L., Pelger, M., & Zhu, J. (2021). Deep learning in asset pricing. Research Methods & Methodology in Accounting eJournal.

Replication environment

We used Python 3.9.0 during development.

Please install all the required libraries with

$ pip3 install -r requirements.txt

Demonstration

To reproduce the results, please follow the following procedure:

  1. Load all required data in any folder
  2. Change the data path in ap/common.py
  3. Perform ETL with scripts in etl in the following order:
    1. yprice.sync.py
    2. fundamental.sync.py
    3. factors.sync.py
    4. etl.sync.py
  4. Perform training with training/gan_UK.sync.py

Models

Models folder contains all the model implementation.

To change the training settings, there are two files to change:

  1. config.json
  2. common.py

config.json contains the training config while common.py contains the common variables shared across different scripts.

We separate the project into the following structure, in the order to replicate the results

  1. ETL
  2. Training
  3. AP

ETL contains the scripts used to transform the raw data. All transformed data will be saved in a folder named data.

Training contains the scripts used to conduct different trainings presented in the paper. The most relevant script is gan_UK.sync.py which trains the GAN model based on UK data.

AP contains the GAN implementation.

asset_pricing's People

Contributors

lingjie00 avatar dependabot[bot] avatar

Watchers

 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.