CS7646 Spring 2020/Development

From Quantitative Analysis Software Courses
Revision as of 19:22, 19 February 2020 by Jfox44 (talk | contribs) (Created page with "== Due Date== 03/15/2020 11:59PM [https://www.timeanddate.com/time/zones/aoe Anywhere on Earth time] ==Revisions== This assignment is subject to change up until 3 weeks pri...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Due Date

03/15/2020 11:59PM Anywhere on Earth time

Revisions

This assignment is subject to change up until 3 weeks prior to the due date. We do not anticipate changes; any changes will be logged in this section.

Overview

In this project you will develop a Theoretically Optimal Strategy and technical indicators that will be the ground layer of a later project. Theoretically Optimal Strategy will give a baseline to gauge your later project against. The technical indicators you develop will be utilized in your later project to devise an intuition-based trading strategy and a Machine Learning based trading strategy. We hope Machine Learning will do better than your intuition, but who knows?

Template

There is no distributed template for this project. You should create a directory for your code in ml4t/manual_strategy and make a copy of util.py there. You will have access to the data in the ML4T/Data directory but you should use ONLY the API functions in util.py to read it.

You should create the following code files for submission. They should comprise ALL code from you that is necessary to run your evaluations.

  • indicators.py Your code that implements your indicators as functions that operate on dataframes. The "main" code in indicators.py should generate the charts that illustrate your indicators in the report.
  • marketsimcode.py An improved version of your marketsim code that accepts a "trades" data frame (instead of a file). More info on the trades data frame below. It is OK not to submit this file if you have subsumed its functionality into one of your other required code files.
  • TheoreticallyOptimalStrategy.py Code implementing a TheoreticallyOptimalStrategy object (details below). It should implement testPolicy() which returns a trades data frame (see below). The main part of this code should call marketsimcode as necessary to generate the plots used in the report.

Note that we may not test your code, so we may not know if you didn't organize your code as recommended, but this arrangement will be required for later projects, so it is worthwhile getting it set up this way. The key requirement is that, if necessary, a TA should be able to run your code on a buffet machine and get the same results (e.g., statistics and charts) that we see in your report.

Data Details, Dates and Rules

  • Use only the data provided for this course. You are not allowed to import external data.
  • Please add in an author function to each file.
  • For your report, use only the symbol JPM. This will enable us to more easily compare results.
  • Use the time period January 1, 2008 to December 31 2009.
  • The out of sample/testing period is January 1, 2010 to December 31 2011.
  • Starting cash is $100,000.
  • Allowable positions are: 1000 shares long, 1000 shares short, 0 shares.
  • Benchmark: The performance of a portfolio starting with $100,000 cash, investing in 1000 shares of JPM and holding that position.
  • There is no limit on leverage.
  • Transaction costs for TheoreticallyOptimalStrategy: Commission: $0.00, Impact: 0.00.
  • Correct trades df format used.

Tasks

What to turn in

Be sure to follow these instructions diligently! No zip files.

Submit the following files (only) via Canvas before the deadline:

  • Project 6: Indicator Evaluation (Report)
    • Your report as report.pdf.
  • Project 6: Indicator Evaluation (Code)
    • Your code as indicators.py, TheoreticallyOptimalStrategy.py, marketsimcode.py (optional if needed)
    • readme.txt document

Unlimited resubmissions are allowed up to the deadline for the project.

Rubric

Report

Code

Is the required code provided, including code to recreate the charts and usage of correct trades data frame. DO NOT use plt.show() and manually save your charts. The charts should be created and saved using Python code (up to -100 if not)

Auto-Grader

No auto-grader for this assignment

Required, Allowed & Prohibited

Required:

  • Your project must be coded in Python 3.6.x.
  • Your code must run on one of the university-provided computers (e.g. buffet01.cc.gatech.edu).
  • Use only the API functions in util.py to read data.
  • All charts must be generated in Python, and you must provide the code you used.

Allowed:

  • You can develop your code on your personal machine, but it must also run successfully on one of the university provided machines or virtual images.
  • Your code may use standard Python libraries.
  • You may use the NumPy, SciPy, matplotlib and Pandas libraries. Be sure you are using the correct versions.
  • Code provided by the instructor, or allowed by the instructor to be shared.
  • A herring.

Prohibited:

  • Generating charts using a method other than Python.
  • Any other method of reading data besides util.py
  • Modifying (or depending on modifications to) util.py.
  • Any libraries not listed in the "allowed" section above.
  • Any code you did not write yourself.

FAQ

  • Q: I want to read some other values from the data besides just adjusted close, how can I do that?
    A: Look carefully at util.py and you will see that you can query for other values.
  • Q: Are we only allowed one position at a time?
    A: You can be in one of three states: -1000 shares, +1000 shares, 0 shares.
  • Q: Are we required to trade in only 1000 share blocks? (and have no more than 1000 shares long or short at a time?
    A: You can trade up to 2000 shares at a time as long as you maintain the requirement of holding 1000, 0 or -1000 shares.
  • Q: Are we limited to leverage of 2.0 on the portfolio?
    A: There is no limit on leverage.