To import trading data from Wealth-Lab Developer or Wealth-Lab Pro into BTAnalytics, you can use the Binary Data Feeder created for this purpose. For more information about Binary Data Feeders, please see: Importing Data using a Binary Data Feeder in the BTAnalytics documentation.
To be able to import data into BTAnalytics from Wealth-Lab, take the following steps:
|1.||Download the Wealth-Lab Binary Data Feeder from the BTAnalytics website.|
You can download the Wealth-Lab Binary Data Feeder from the External Data Feeders download page in our website.
|2.||Install the Wealth-Lab Data Feeder.|
You must decompress the downloaded file and move all the included files to the Wealth-Lab installation directory in your computer (the folder where the 'WealthLabxxx.exe' is located).
That's all! When Wealth-Lab runs, it detects the Binary Data Feeder as a plugin and loads it.
|3.||Configure the Wealth-Lab Data Feeder.|
The next step is to enable the Data Feeder plugin from the Wealth-lab menu, by selecting 'Tools' -> 'Preferences' and inside the shown 'Preferences' dialog, in the 'Performance Visualizers' section activate the 'BTAnalytics Data Feeder'.
|4.||Easily export your Trading Data from Wealth-Lab into BTAnalytics!|
Whenever you want to export your Trading Data (backtest results or live trading data) from Wealth-Lab into BTAnalytics, you only have to select the 'BTAnalytics Data Feeder' performance visualizer.
In this window, you can:
|•||Select a name for the exported data, write a small note (that will be shown in the Studies Explorer) or a deeper description.|
|•||Normalize Equity Curve: you can make that the exported Equity Curve only has data points with certain periodicity. For example you can normalize an intraday Trading System equity curve to show the equity curve with data only in a daily basis.|
|•||Include Analysis Variables: Select if you want to include Analysis Variables with the exported data. You can include all the series used in the Trading System or you can explicitly include only some series in the exported data. See 'Exporting Analysis Variables'.|
|•||Ignore Priority When Comparing Positions: This control allows you to configure whether BTAnalytics should take into account the Trade Priority field when searching for exact matches of the simulation being imported among the already imported Trading Data. (BTAnalytics can be configured to only import the Trading Results that haven't already been imported before and hence checks all the previously imported Trading Data before importing a new Data Set)|
If you want to include Analysis Variables for further analysis or to design filters over them using the BTAnalytics Analysis Vars DAV or the Analysis Vars Derivation Builder, you have to check the 'Include Analysis Variables' option in the BTAnalytics Data Feeder Performance Visualizer.
Then, you can include Analysis Variables data with the Trading Data using one of two methods:
|1.||Export all the series used by the Trading System.|
This method includes with each exported Trade, the value of all the Series used in the Trading System in the bar before the entry, in the bar of the entry, in the bar before exit and in the bar of the exit.
If the Trading System makes use of a lot of Series this method is discouraged because it can include a lot of useless data with the exported Trades.
|2.||Analysis Variables Included in Positions Tag Field.|
This method allows to explicitly select the Series that you want to export. It has the drawback that you need to modify the code of the Trading System but allows more control. In order to use this method:
|1.||Suppose that you want to include with the Trading Data four series for further analysis using BTAnalytics. The series are defined as follows:|
|2.||Then in the entry rules, you could include the Series as follows:|
// ENTRY RULES:
|▪||Create a Dictionary to store all the Analysis Vars information for the current position. The key of this dictionary contains the Analysis Var Name and has another embedded dictionary whose key is a number between 1-4 indicating the Bar Of Analysis:|
|o||1-> Bar before entry|
|o||2-> Bar of entry|
|o||3-> Bar before exit|
|o||4-> Bar of exit|
The value of the embedded dictionary will be the value of the Analysis Var.
Dictionary<string, Dictionary<int,double>> anVars = new Dictionary<string,Dictionary<int,double>>();
|▪||Create the embedded dictionary for each Analysis Var:|
Dictionary<int,double> LiquiditySeriesDict = new Dictionary<int,double>();
|▪||Add the Analysis Var value to the embedded dictionary for the desired Bar Of Analysis:|
|▪||Add the embedded dictionary to the main dictionary:|
|▪||Finally, add the main dictionary to the 'Tag' field of the current position:|
p.Tag = anVars;
|3.||When you imports into BTAnalytics the Trading Results, you will be able to analyze the results for the Analysis Vars in the Analysis Vars DAV of the Raw Simulation Study or in the Analysis Var Derivation Builder:|
Note: Wealth-Lab is a trademark of Fidelity Investments.