Reverse Splits and Unreliable Options Chains
5 stars based on
MarketFlow transforms financial market data into machine learning models for making market predictions. The platform gets stock price data from Yahoo Finance end-of-day and Google Finance intradaytransforming the data into canonical form for training and testing.
MarketFlow is powerful because you can easily apply new features to groups of stocks simultaneously using our Variable Definition Language VDL. All of the dataframes are aggregated and split into training and testing files for input into AlphaPy. Both data sources have the standard primitives: OpenUvxy option yahoo trading hoursLowCloseand Volume. For daily data, there is a Date timestamp and for intraday data, there is a Datetime timestamp.
All trading days do not end at 4: Normal market hours are uvxy option yahoo trading hours Here, we retrieved the data from the CST time zone, one hour ahead. You can get Google intraday data going back a maximum of 50 days. If you want to build your own historical record, then we recommend that you save the data on an ongoing basis for a uvxy option yahoo trading hours larger backtesting window. The market configuration file market.
This file is stored in the config directory of your project, along with the model. The market section has the following parameters:. The cornerstone of MarketFlow is the Analysis. You can create models and forecasts for different groups of stocks. The purpose of the analysis object is to gather data for all of the group members and then consolidate the data into train and test files.
Further, some features and the target variable have to be adjusted lagged to avoid uvxy option yahoo trading hours leakage. A group is simply a collection of symbols for analysis. In this example, we create different groups for technology stocks, ETFs, and a smaller group for testing.
Because market analysis encompasses a wide array of technical indicators, you can define features using the Variable Definition Language VDL.
The concept is simple: You can use the technical analysis functions in AlphaPy, or define your own. It has two parameters: Typically, a moving average is calculated with the closing price, so we can define an alias cma which represents the closing moving uvxy option yahoo trading hours.
An alias is simply a substitution mechanism for replacing one string with an abbreviation. Finally, we can define the variable abovema with a relational expression. Note that numeric values in the expression can be substituted when defining features, e. Variable expressions are valid Python expressions, with the addition of offsets to reference previous values.
Once the aliases and variables are uvxy option yahoo trading hours, a foundation is established for defining all of the features that you want to test. MarketFlow provides two out-of-the-box trading systems. The second system is an open range breakout strategy. The premise of the system is to wait for an established high-low range in the first n minutes e.
Typically, a stop-loss is set at the other side of the breakout range. The last file is the list of trades generated by MarketFlow based on the system specifications. If we developed a moving average crossover system on daily data for technology stocks, then the trades file could be named:. The important point here is to reserve a namespace for different combinations of groups, systems, and fractals to compare performance over space and time.
MarketFlow runs on top of AlphaPy, so the model. In the following example, note the use of treatments to calculate runs for a set of features. First, change the directory to your project location, where you have already followed the Project Structure specifications:. In the project location, run mflow with the predict flag. MarketFlow will automatically create the predict.
Amazon Daily Stock Prices Source: Note You can get Google intraday data going back a maximum of 50 days. The market section has the following parameters: Number of periods of historical data to retrieve. Number of periods to forecast for the target variable. The time quantum for the data feed, represented by an integer followed by a character code. A list of features that are coincident with the target variable.
For example, with daily stock market data, the Open is considered to be a leader because it is recorded at the market open.
In contrast, the daily High or Low cannot be known until the the market close. This is the minimum number of periods required to derive all of the features in prediction mode on a given uvxy option yahoo trading hours.
This string uniquely identifies the subject matter of the data. A schema could be prices for identifying market data. The name of the group selected from the groups section, e.
Read the Docs v: