Welcome to the Frequently Asked Questions Guide. This section contains commonly asked questions and answers regarding the Deep Signal Library.


Can the Deep Signal Library filter trade set ups when creating a new machine learning model and/or when using the machine learning model in trading?


When creating a new machine learning model, the Deep Signal Library provides four methods the user can use to filter out data sets they do not want added to the model training set. The DSTIsValidLongDataSet, DSTIsValidShortDataSet, DSTIsValidFailedLongDataSet and DSTIsValidFailedShortDataSet.


How does the data flow work when creating machine learning models? 


The data flow is the same as running a backtest. All of the data is loaded from historical data and is selected by the user in the Data Series section of the Strategy Analyzer window. You can choose the range of data by modifying the Start date and End date in the Time frame section.


Which data is used to form the "normal" or "do not take a trade now" background data set?


The Deep Signal Library will go through each bar of data that is selected from the range in the Strategy Analyzer and find which data sets hit a long or short profit target. It will add those data sets to the respective long or short training sets and then skip ahead by the data window size plus the bars to target size in bars. If the library does not have a profit target for a particular bar then it will add that data set to the "do not trade" sets and go to the next bar. There is a feature that will allow you to not skip ahead called BarByBarModelCreation.


How is normalization done for the data set?


Normalization is done when all of the data has been captured and the backtest is complete. The library will go through all of the data and look for the highs and lows for all of the indicator and/or instrument data. If the indicator data was added via the default method, AddDSTIndicator(ISeries<double> dataSeries, string name, int decimalPrecision) then the library will use the 2 x high for the high and if the lowest value was less than 0, it would use 2 x low for the lowest value. The values are normalized between 0 and 1 with the following equation:


normalized val = (x - min(x)) / (max(x) - min(x))     (https://en.wikipedia.org/wiki/Feature_scaling)


When initially adding the indicator data to be used for the model, the user can also specify their own min or max for the indicator data with the following method:


AddDSTIndicator(ISeries<double> dataSeries, string name, int decimalPrecision, double min, double max)


This will force using a particular min or max, rather than looking through the indicator data. When running live and we are passing indicator data to the model, if the value passed is larger than the value used in creating the model, the library will just use the max value.


Are you going to add Feature Importance to determine how relevant a particular feature is in the data set?


Yes, feature importance has been added in version 1.6. 


How can the user decide how much of the whole data set to devote to training versus testing?


Currently the user can select what percentage of the whole data set they want to use for training versus testing. This is done in the Strategy Analyzer Training Parameters section with the Percentage of Data for Training setting. The text files that are generated contain data for the whole data set and are not broken down into training versus test set.


How can the user choose which trainers they would like to use for creating a machine learning model?


In Strategy Analyzer in the ML Trainer section there is a dropdown list called Trainer Selection. If the SelectTrainers is selected then a list of available trainers will appear with checkboxes to select which trainer to use for creating a new model.


Can the Deep Signal Library support continuous contracts from data providers that do not have ##-##?


Yes, the Deep Signal Library can create machine learning models and use data from data providers that do not use ##-## for their contract dates. NinjaTrader can automatically stitch together multiple contract dates to create one continuous contract. Please see the NinjaTrader topic: https://ninjatrader.com/support/forum/forum/ninjatrader-8/platform-technical-support-aa/109434-continuous-futures-contracts



How are outlier data sets removed using standard deviation?


The library will look at all of the data sets in which the price has moved either Ticks Up To Profit Target or Ticks Down To Profit Target within the Bars To Target settings. If it finds a potential profit target it will use all of bars of data from the Pre-Signal window through the end of the Bars To Target window and add that to a data set. For each data set, the library will find the largest price move beginning from the Signal Bar through the end of the Bars To Target window and use that value to remove outlier data sets.