theoretically optimal strategy ml4t
Theoretically optimal (up to 20 points potential deductions): Is the methodology described correct and convincing? Do NOT copy/paste code parts here as a description. You must also create a README.txt file that has: The following technical requirements apply to this assignment. You should have already successfully coded the Bollinger Band feature: Another good indicator worth considering is momentum. While Project 6 doesnt need to code the indicators this way, it is required for Project 8, 3.5 Part 3: Implement author() function (deduction if not implemented). ) You should implement a function called author() that returns your Georgia Tech user ID as a string in each .py file. By analysing historical data, technical analysts use indicators to predict future price movements. By making several approximations to the theoretically-justified procedure, we develop a practical algorithm, called Trust Region Policy Optimization (TRPO). Use only the functions in util.py to read in stock data. The file will be invoked run: entry point to test your code against the report. (up to 3 charts per indicator). Please note that requests will be denied if they are not submitted using the, form or do not fall within the timeframes specified on the. that returns your Georgia Tech user ID as a string in each .py file. Use only the data provided for this course. This class uses Gradescope, a server-side auto-grader, to evaluate your code submission. If you use an indicator in Project 6 that returns multiple results vectors, we recommend taking an additional step of determining how you might modify the indicator to return one results vector for use in Project 8. Anti Slip Coating UAE You should create a directory for your code in ml4t/indicator_evaluation. Include charts to support each of your answers. If you want to use EMA in addition to using MACD, then EMA would need to be explicitly identified as one of the five indicators. These commands issued are orders that let us trade the stock over the exchange. This length is intentionally set, expecting that your submission will include diagrams, drawings, pictures, etc. This copyright statement should not be removed, We do grant permission to share solutions privately with non-students such, as potential employers. Both of these data are from the same company but of different wines. Not submitting a report will result in a penalty. The following textbooks helped me get an A in this course: You may not use any code you did not write yourself. Please note that there is no starting .zip file associated with this project. Charts should be properly annotated with legible and appropriately named labels, titles, and legends. It should implement testPolicy () which returns a trades data frame (see below). An indicator can only be used once with a specific value (e.g., SMA(12)). Since the above indicators are based on rolling window, we have taken 30 Days as the rolling window size. Spring 2019 Project 6: Manual Strategy From Quantitative Analysis Software Courses Contents 1 Revisions 2 Overview 3 Template 4 Data Details, Dates and Rules 5 Part 1: Technical Indicators (20 points) 6 Part 2: Theoretically Optimal Strategy (20 points) 7 Part 3: Manual Rule-Based Trader (50 points) 8 Part 4: Comparative Analysis (10 points) 9 Hints 10 Contents of Report 11 Expectations 12 . specifies font sizes and margins, which should not be altered. For your report, use only the symbol JPM. Create a Theoretically optimal strategy if we can see future stock prices. Lastly, I've heard good reviews about the course from others who have taken it. The Theoretically Optimal Strategy will give a baseline to gauge your later projects performance. Make sure to cite any sources you reference and use quotes and in-line citations to mark any direct quotes. Students are encouraged to leverage Gradescope TESTING before submitting an assignment for grading. In this case, MACD would need to be modified for Project 8 to return your own custom results vector that somehow combines the MACD and Signal vectors, or it would need to be modified to return only one of those vectors. Now consider we did not have power to see the future value of stock (that will be the case always), can we create a strategy that will use the three indicators described to predict the future. This file has a different name and a slightly different setup than your previous project. (up to -5 points if not). You are allowed unlimited resubmissions to Gradescope TESTING. and has a maximum of 10 pages. All work you submit should be your own. However, sharing with other current or future, students of CS 7646 is prohibited and subject to being investigated as a, -----do not edit anything above this line---, # this is the function the autograder will call to test your code, # NOTE: orders_file may be a string, or it may be a file object. It should implement testPolicy(), which returns a trades data frame (see below). Simple Moving average 1. We have you do this to have an idea of an upper bound on performance, which can be referenced in Project 8. In this project, you will develop technical indicators and a Theoretically Optimal Strategy that will be the ground layer of a later project. Please submit the following file to Canvas in PDF format only: Please submit the following files to Gradescope, We do not provide an explicit set timeline for returning grades, except that everything will be graded before the institute deadline (end of the term). To review, open the file in an editor that reveals hidden Unicode characters. This algorithm is similar to natural policy gradient methods and is effective for optimizing large nonlinear policies such as neural networks. Now we want you to run some experiments to determine how well the betting strategy works. These should be incorporated into the body of the paper unless specifically required to be included in an appendix. You may not modify or copy code in util.py. Use only the functions in util.py to read in stock data. Create a Manual Strategy based on indicators. (up to -100 points), If any charts are displayed to a screen/window/terminal in the Gradescope Submission environment. The report is to be submitted as report.pdf. No credit will be given for coding assignments that fail in Gradescope SUBMISSION and failed to pass this pre-validation in Gradescope TESTING. 6 Part 2: Theoretically Optimal Strategy (20 points) 7 Part 3: Manual Rule-Based Trader (50 points) 8 Part 4: Comparative Analysis (10 points) . . In addition to testing on your local machine, you are encouraged to submit your files to Gradescope TESTING, where some basic pre-validation tests will be performed against the code. The directory structure should align with the course environment framework, as discussed on the local environment and ML4T Software pages. Performance metrics must include 4 digits to the right of the decimal point (e.g., 98.1234), You are allowed unlimited resubmissions to Gradescope TESTING. For your report, use only the symbol JPM. Charts should be properly annotated with legible and appropriately named labels, titles, and legends. Note: The format of this data frame differs from the one developed in a prior project. Assignments should be submitted to the corresponding assignment submission page in Canvas. However, that solution can be used with several edits for the new requirements. This is the ID you use to log into Canvas. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. The main part of this code should call marketsimcode as necessary to generate the plots used in the report. Within each document, the headings correspond to the videos within that lesson. If the report is not neat (up to -5 points). Benchmark (see definition above) normalized to 1.0 at the start: Plot as a, Value of the theoretically optimal portfolio (normalized to 1.0 at the start): Plot as a, Cumulative return of the benchmark and portfolio, Stdev of daily returns of benchmark and portfolio, Mean of daily returns of benchmark and portfolio, sd: A DateTime object that represents the start date, ed: A DateTime object that represents the end date. You will submit the code for the project. You are encouraged to perform any tests necessary to instill confidence in your implementation, ensure that the code will run properly when submitted for grading and that it will produce the required results. @param points: should be a numpy array with each row corresponding to a specific query. It is not your, student number. Please keep in mind that the completion of this project is pivotal to Project 8 completion. Strategy and how to view them as trade orders. We will be utilizing SMA in conjunction with a, few other indicators listed below to optimize our trading strategy for real-world. . Ten pages is a maximum, not a target; our recommended per-section lengths intentionally add to less than 10 pages to leave you room to decide where to delve into more detail. The technical indicators you develop here will be utilized in your later project to devise an intuition-based trading strategy and a Machine Learning based trading strategy. Once you are satisfied with the results in testing, submit the code to Gradescope SUBMISSION. Instantly share code, notes, and snippets. Assignments received after Sunday at 11:59 PM AOE (even if only by a few seconds) are not accepted without advanced agreement except in cases of medical or family emergencies. Use the time period January 1, 2008, to December 31, 2009. You are allowed to use up to two indicators presented and coded in the lectures (SMA, Bollinger Bands, RSI), but the other three will need to come from outside the class material (momentum is allowed to be used). You are encouraged to submit your files to Gradescope TESTING, where some basic pre-validation tests will be performed against the code. that returns your Georgia Tech user ID as a string in each . Cannot retrieve contributors at this time. 'Technical Indicator 3: Simple Moving Average (SMA)', 'Technical Indicator 4: Moving Average Convergence Divergence (MACD)', * MACD - https://www.investopedia.com/terms/m/macd.asp, * DataFrame EWM - http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.ewm.html, Copyright 2018, Georgia Institute of Technology (Georgia Tech), Georgia Tech asserts copyright ownership of this template and all derivative, works, including solutions to the projects assigned in this course. More specifically, the ML4T workflow starts with generating ideas for a well-defined investment universe, collecting relevant data, and extracting informative features. You may also want to call your market simulation code to compute statistics. You must also create a README.txt file that has: The secret regarding leverage and a secret date discussed in the YouTube lecture do not apply and should be ignored. Theoretically Optimal Strategy will give a baseline to gauge your later project's performance against. Please note that util.py is considered part of the environment and should not be moved, modified, or copied. Why there is a difference in performance: Now that we have found that our rule based strategy was not very optimum, can we apply machine learning to learn optimal rules and achieve better results. Provide a compelling description regarding why that indicator might work and how it could be used. They should contain ALL code from you that is necessary to run your evaluations. Please submit the following file(s) to Canvas in PDF format only: Do not submit any other files. Your report should use. Complete your assignment using the JDF format, then save your submission as a PDF. You will have access to the ML4T/Data directory data, but you should use ONLY the API functions in util.py to read it. In the Theoretically Optimal Strategy, assume that you can see the future. We propose a novel R-tree packing strategy that produces R-trees with an asymptotically optimal I/O complexity for window queries in the worst case. sshariff01 / ManualStrategy.py Last active 3 years ago Star 0 Fork 0 ML4T - Project 6 Raw indicators.py """ Student Name: Shoabe Shariff GT User ID: sshariff3 GT ID: 903272097 """ import pandas as pd import numpy as np import datetime as dt import os Please submit the following files to Gradescope, Important: You are allowed a MAXIMUM of three (3) code submissions to Gradescope, Once grades are released, any grade-related matters must follow the, Assignment Follow-Up guidelines and process, alone. This project has two main components: First, you will develop a theoretically optimal strategy (TOS), which represents the maximum amount your portfolio can theoretically return. and has a maximum of 10 pages. In your report (described below), a description of each indicator should enable someone to reproduce it just by reading the description. The indicators that are selected here cannot be replaced in Project 8. Create a set of trades representing the best a strategy could possibly do during the in-sample period using JPM. You should create the following code files for submission. . As max(col1) = 1 , max(col2) = 2 , max(col3) = 1, min(row1) = -1 , min(row2) = 0 , min(row3) = -1 there is not a simultaneous row min and row max a . We want a written detailed description here, not code. Technical analysis using indicators and building a ML based trading strategy. However, it is OK to augment your written description with a. By looking at Figure, closely, the same may be seen. Create testproject.py and implement the necessary calls (following each respective API) to indicators.py and TheoreticallyOptimalStrategy.py, with the appropriate parameters to run everything needed for the report in a single Python call. You may not use an indicator in Project 8 unless it is explicitly identified in Project 6. Include charts to support each of your answers. Please address each of these points/questions in your report. An improved version of your marketsim code accepts a trades DataFrame (instead of a file). You may also want to call your market simulation code to compute statistics. If you use an indicator in Project 6 that returns multiple results vectors, we recommend taking an additional step of determining how you might modify the indicator to return one results vector for use in Project 8. Please submit the following files to Gradescope SUBMISSION: Important: You are allowed a MAXIMUM of three (3) code submissions to Gradescope SUBMISSION. This length is intentionally set, expecting that your submission will include diagrams, drawings, pictures, etc. Some indicators are built using other indicators and/or return multiple results vectors (e.g., MACD uses EMA and returns MACD and Signal vectors). (The indicator can be described as a mathematical equation or as pseudo-code). The file will be invoked run: This is to have a singleentry point to test your code against the report. You are encouraged to develop additional tests to ensure that all project requirements are met. In your report (described below), a description of each indicator should enable someone to reproduce it just by reading the description. This file should be considered the entry point to the project. We want a written detailed description here, not code. It should implement testPolicy(), which returns a trades data frame (see below). This assignment is subject to change up until 3 weeks prior to the due date. We want a written detailed description here, not code. Create a set of trades representing the best a strategy could possibly do during the in-sample period using JPM. Textbook Information. Technical indicators are heuristic or mathematical calculations based on the price, volume, or open interest of a security or contract used by traders who follow technical analysis. We hope Machine Learning will do better than your intuition, but who knows? This is a text file that describes each .py file and provides instructions describing how to run your code. df_trades: A single column data frame, indexed by date, whose values represent trades for each trading day (from the start date to the end date of a given period). Our Challenge . Note: The Theoretically Optimal Strategy does not use the indicators developed in the previous section. Charts should also be generated by the code and saved to files. Floor Coatings. , where folder_name is the path/name of a folder or directory. We will learn about five technical indicators that can. Be sure you are using the correct versions as stated on the. The report will be submitted to Canvas. Contribute to havishc19/StockTradingStrategy development by creating an account on GitHub. TheoreticallyOptimalStrategy.pyCode implementing a TheoreticallyOptimalStrategy object (details below). You may not use any other method of reading data besides util.py. (-5 points if not), Is there a chart for the indicator that properly illustrates its operation, including a properly labeled axis and legend? For grading, we will use our own unmodified version. (-15 points each if not), Does the submitted code indicators.py properly reflect the indicators provided in the report (up to -75 points if not). a)Equal to the autocorrelation of lag, An investor believes that investing in domestic and international stocks will give a difference in the mean rate of return. . The submitted code is run as a batch job after the project deadline. The Gradescope TESTING script is not a complete test suite and does not match the more stringent private grader that is used in Gradescope SUBMISSION. For our report, We are are using JPM stock, SMA is a type of moving mean which is created by taking the arithmetic mean, of a collection of data. Some may find it useful to work on Part 2 of the assignment before beginning Part 1. Please note that there is no starting .zip file associated with this project. They should comprise ALL code from you that is necessary to run your evaluations. We hope Machine Learning will do better than your intuition, but who knows? Students, and other users of this template code are advised not to share it with others, or to make it available on publicly viewable websites including repositories, such as github and gitlab. Considering how multiple indicators might work together during Project 6 will help you complete the later project. Once grades are released, any grade-related matters must follow the Assignment Follow-Up guidelines and process. Theoretically, Optimal Strategy will give a baseline to gauge your later project's performance. The file will be invoked using the command: This is to have a singleentry point to test your code against the report. Gradescope TESTING does not grade your assignment. The directory structure should align with the course environment framework, as discussed on the. In this case, MACD would need to be modified for Project 8 to return your own custom results vector that somehow combines the MACD and Signal vectors, or it would need to be modified to return only one of those vectors. For our discussion, let us assume we are trading a stock in market over a period of time. We can calculate Price/SMA (PSMA) values and use them to generated buy or, and above can indicate SELL. Please keep in mind that the completion of this project is pivotal to Project 8 completion. June 10, 2022 Develop and describe 5 technical indicators. This assignment is subject to change up until 3 weeks prior to the due date. At a minimum, address each of the following for each indicator: The total number of charts for Part 1 must not exceed 10 charts. Benchmark (see definition above) normalized to 1.0 at the start: Plot as a, Value of the theoretically optimal portfolio (normalized to 1.0 at the start): Plot as a, Cumulative return of the benchmark and portfolio, Stdev of daily returns of benchmark and portfolio, Mean of daily returns of benchmark and portfolio, sd: A DateTime object that represents the start date, ed: A DateTime object that represents the end date. This is the ID you use to log into Canvas. Gradescope TESTING does not grade your assignment. (up to 3 charts per indicator). This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. Charts should also be generated by the code and saved to files. Please keep in mind that completion of this project is pivotal to Project 8 completion. Individual Indicators (up to 15 points potential deductions per indicator): If there is not a compelling description of why the indicator might work (-5 points), If the indicator is not described in sufficient detail that someone else could reproduce it (-5 points), If there is not a chart for the indicator that properly illustrates its operation, including a properly labeled axis and legend (up to -5 points), If the methodology described is not correct and convincing (-10 points), If the chart is not correct (dates and equity curve), including properly labeled axis and legend (up to -10 points), If the historical value of the benchmark is not normalized to 1.0 or is not plotted with a green line (-5 points), If the historical value of the portfolio is not normalized to 1.0 or is not plotted with a red line (-5 points), If the reported performance criteria are incorrect (See the appropriate section in the instructions above for required statistics). Buy-Put Option A put option is the opposite of a call. Note: Theoretically Optimal Strategy does not use the indicators developed in the previous section. Fall 2019 ML4T Project 6. to develop a trading strategy using technical analysis with manually selected indicators. Calling testproject.py should run all assigned tasks and output all necessary charts and statistics for your report. Learn more about bidirectional Unicode characters. PowerPoint to be helpful. 64 lines 2.0 KiB Raw Permalink Blame History import pandas as pd from util import get_data from collections import namedtuple Position = namedtuple("Pos", ["cash", "shares", "transactions"]) def author(): return "felixm" def new_positions(positions, price): For the Theoretically Optimal Strategy, at a minimum, address each of the following: There is no locally provided grading / pre-validation script for this assignment. Your TOS should implement a function called testPolicy() as follows: Your testproject.py code should call testPolicy() as a function within TheoreticallyOptimalStrategy as follows: The df_trades result can be used with your market simulation code to generate the necessary statistics. . Readme Stars. The, number of points to average before a specific point is sometimes referred to as, In our case, SMA aids in smoothing out price data over time by generating a, stream of averaged out prices, which aids in suppressing outliers from a dataset, and so lowering their overall influence. This is an individual assignment. Please address each of these points/questions in your report. All work you submit should be your own. Clone with Git or checkout with SVN using the repositorys web address. The Project Technical Requirements are grouped into three sections: Always Allowed, Prohibited with Some Exceptions, and Always Prohibited. No packages published . Explicit instructions on how to properly run your code. Floor Coatings. Experiment 1: Explore the strategy and make some charts. Please keep in mind that the completion of this project is pivotal to Project 8 completion. Description of what each python file is for/does. If you need to use multiple values, consider creating a custom indicator (e.g., my_SMA(12,50), which internally uses SMA(12) and SMA(50) before returning a single results vector). You may create a new folder called indicator_evaluation to contain your code for this project. Please address each of these points/questions in your report. +1000 ( We have 1000 JPM stocks in portfolio), -1000 (We have short 1000 JPM stocks and attributed them in our portfolio). Calling testproject.py should run all assigned tasks and output all necessary charts and statistics for your report.