Announcing The Release of DLPAL PRO

We are pleased to announce the release of DLPAL PRO. This marks a milestone in the development of this advanced machine learning tool for financial trading. Examples with results are included at the end of this article.

DLPAL PRO has all the function for the basic version plus a new feature cluster and a major function that allows creating historical files with advanced features based on  p-indicator results. This is achieved in unsupervised learning mode. The features can be used in developing algos and applying supervised machine learning for both directional and long/short strategies with any number of securities.

Types of created historical files

Two types of historical data files can be created with the PRO version of DLPAL

  • Features for individual securities
  • Features for an ensemble of securities (for example an index or holdings of an ETF)

Specifications and format of generated files are included after the examples.

Edit on 11/13/2016: Version 2.0 of DLPAL PRO was released.

Using the PRO version new function

From Tools select “P-Indicator history”

prosel

Below is the screen with the available options:

prooptions

In the above example, only SPY is selected and we want a file with 500 records of history for that particular ETF.

In the example below, the group of Dow-30 stocks is selected and 500 historical entries are requested:

prooptions2

Note that in both cases a TRS files with the target and stops must be specified along with the Trade Parameters and Major Cluster Type. The default options for the latter two are recommended.

Example 1: SPY history

Normal cluster

After generating a file with SPY history of 1500 bars (took less than an hour), we created the following strategy in Amibroker:

Buy at the next open if PL > b
Close long at next open if PL < a
Short at next open if PS > b
Close short at next open if PS < a

(The proper values of a and b can be determined by users of DLPAL PRO via backtesting.)

The results are shown below:

spy_55_52_eq_20161027

Volume is PL, Open Interest is PS, AUX1 is Pdelta and AUX2 is S (See format above.)

The strategy has very low drawdown of -5.18% in the test period from 20101112 (start of history file) to 20161027. Calmar ratio is 1. For SPY buy and hold, max drawdown is -18.6% and Calmar is 0.67. Therefore, one could leverage this strategy and beat the buy and hold CAR of 12.37% on a risk-adjusted basis.

Moderate cluster

This cluster allows more conservative performance because it has twice as many features as the normal cluster. Here is the general setup:

prooptions_mod

After generating a file with SPY history and length of 1500 bars (took less than an hour), we created the following strategy in Amibroker:

Buy at the next open if PL > b
Close long at next open if PL < a
Short at next open if PS > b
Close short at next open if PS < a

(The proper values of a and b can be determined by users of DLPAL PRO via backtesting.)

The results are shown below:

spy_53_51_eq_20161027

Volume is PL, Open Interest is PS, AUX1 is Pdelta and AUX2 is S (See format above.)

The strategy has lower drawdown of -3.92% in the test period from 20101112 (start of history file) to 20161027. Calmar ratio is 1.43, much greater than 1. For SPY buy and hold, max drawdown is -18.6% and Calmar is 0.67.

This particular cluster shows a lot of promise for generating more robust strategies and also for use with machine learning but more tests are required. If in doubt, there is a lot of evidence going back several years that the normal cluster is robust.

Example 2: Dow-30 ensemble history

After creating a file for the group of DOw-30 stocks with 500 entries (took about three hours and covers the period from 11/05/2014 to 10/28/2016), we added the generated features to the original SPY data file and imported it in Amibroker. We tested the following simple strategy that uses only the Pratio feature:

Buy at the naxt open if Pratio > a
Short at the next open if Pratio < b
Keep position open for 2 days and exit at the open of day 3

(The values of a and b can be determined by users of DLPAL PRO via backtesting.)

The results are shown below:

piratio_eq_20150123_20161028

Volume is avgPL, open interest is avgPS and AUX1 is Pratio.

This is a basic strategy to demonstrate the new program options that uses only the Pratio feature and there is a lot of room for improvement. As noted on the above chart, the strategy shows significant outperformance of SPY buy and hold return in both absolute terms but more importantly on a risk-adjusted basis, with a total of 95 trades, 70 long and 25 short.

In another post we will discuss how to add a binary target class  to generated files and then use machine learning classifiers to train models and test them on unseen data.

The development of DLPAL PRO will continue and we plan to add more capabilities for creating data for use with machine earnings and for developing trading strategies.

A demo of DLPAL PRO is not available but there is a demo of the basic version.

Specifications and format

Features for individual securities

These files are created when only one security is selected from a group of securities. The files have a number of historical data entries specified by the user. The name of the generated file is the original data file name with the extension .pih. The file is saved in the parent directory and deleted when a new file for that security is created.

File format:

Date, open, high, low, close, PL, PS, Pdelta, S

where for each Date starting from the most recent date in the file, PL is the long directional probability, PS is the short directional probability, Pdelta is (PL− PS) and S is the significance of PL and PS.

Features for an ensemble of securities

These files are created when a group of securities is selected. The file name is always pi.pih and it is saved in the parent directory. The file is deleted when a new file for that group is created.

File format:

Date, avgPL, avgPS, Pratio, avgPLS. avgPSS

where, for a given date and all securities in the group starting from the most recent date, avgPL is the average of long directional probabilities, avgPS is the average of short directional probabilities, Pratio is the number of securities with positive directional bias divided by the total number of securities, avgPLS is the significance-weighted avgPL and avgPSS is the significance-weighted avgPS.

If you have any questions or comments, happy to connect on Twitter: @priceactionlab

Subscribe via RSS or Email, or follow us on Twitter.

Disclaimer

Copyright Notice

This entry was posted in Technical Analysis and tagged , . Bookmark the permalink.

Leave a Reply