Ninja Trader: Introduction to data mining in financial applications Artem Gritsenko CS 548 Showcase Feb 7, 2014
Resources Ninja Trader: Homepage: http://www.ninjatrader.com Download: http://www.ninjatrader.com/download-registration.php Tutorial: http://www.ninjatrader.com/support/helpGuides/nt7/index.html Learning videos: http://www.youtube.com/user/NinjaTraderLLC References on data mining in financial applications: http://www.nag.com/IndustryArticles/DMinFinancialApps.pdf http://link.springer.com/chapter/10.1007%2F0-387-25465-X_57 http://suraj.lums.edu.pk/~cs631s05/Papers/financial.pdf
Motivation Why financial applications? Real-world problem that can be solved with data mining and that is still subject to research. FA use all variety of different KDD and data mining techniques: data aggregation, visualization, feature selection, prediction,etc. Why Ninja Trader? Free to download and use Has a setting of simulated trading (to learn and play)
Nature of financial data Financial dataset: Usually consists of 5 attributes: index value at open, index value at close, highest index value, lowest index value, trading volume (daily). Data integration: Mediation Approach: allows information to be retrieved directly from original databases (Yahoo finance, Google finance, etc.)
Dataset analysis Data exploration Summary statistics - standard deviation, moving average, simple prediction based on linear regression Visualization ... Data Preprocessing Data aggregation (day, month, year) Feature construction (moving average) Sampling - in Monte Carlo Simulation
Trading rules Trading rules can be determined from data with a categorical outcome, e.g., buy or sell, rise or fall. This leads to a classification task: at each time step data is classified into one of the categories: Buy stock Sell stock If we consider rules in the form of conditional statements IF CONDITION1 AND CONDITION2 THEN ACTION the model can be fitted with a decision tree. Langdel(2009)
Decision Tree Tree construction: Nodes: tests (X1 >= VALUE or {(X2 = i)}, for i=1, 2,..) Leaves: decisions (sell, buy) Ex. "When the 10-day moving average crosses above the 30-day moving average and both moving averages are increasing it is time to buy"
Other approaches Statistical Autoregressive models Moving average models Advantage: easy to interpret Disadvantage: need parameters to be set properly Neural networks: Advantage: ability to model very complex data Disadvantage: hard to interpret
Conclusion Only main features and capabilities of the software discussed There is an advanced and more powerful version of Ninja Trader exist (not free!) You can add your own functionality(strategies, indicators, etc.) to Ninja Trader with NinjaScript (basically C#) http://www.ninjatrader.com/support/helpGuides/nt7/index.html?distribution. htm