NexusFi: Find Your Edge


Home Menu

 





Profitable Neural Network Strategy


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Ranger with 25 posts (24 thanks)
    2. looks_two tortexal with 11 posts (2 thanks)
    3. looks_3 zacharydw00 with 8 posts (10 thanks)
    4. looks_4 bomberone1 with 5 posts (1 thanks)
      Best Posters
    1. looks_one zacharydw00 with 1.3 thanks per post
    2. looks_two Ranger with 1 thanks per post
    3. looks_3 Big Mike with 0.8 thanks per post
    4. looks_4 tortexal with 0.2 thanks per post
    1. trending_up 47,376 views
    2. thumb_up 46 thanks given
    3. group 36 followers
    1. forum 70 posts
    2. attach_file 60 attachments




 
Search this Thread

Profitable Neural Network Strategy

  #1 (permalink)
 
zacharydw00's Avatar
 zacharydw00 
Idaho
 
Experience: Intermediate
Platform: NinjaTrader,ToS
Broker: Amp Futures, ToS
Trading: ES, E7, CL, GC
Posts: 149 since Aug 2009
Thanks Given: 87
Thanks Received: 180

The purpose of this posting is as follows:

a) demonstrate our use of Chaos Hunter as we apply it to an intra-day scalping strategy for the ES;

b) generate interest and possibly gain support from other forum members;

c) collaboration with the objective of designing a better predictive algorithms; better money management & risk rules.


Notes:

a) We trained the network in Chaos Hunter and exported the results into Easy Language, where we built a committee of models; polling conditions etc. When the model starts to degrade in performance, we will either retune it or replace it.

c) BEFORE YOU LOAD THE ELD files, please view the screen shots for the ELD Files. If you have Functions with the same names, importing the file may lead to over-writing.

c) Before you try to demo the strategy, please open the Strategy txt file and read our notes.

d) We encourage forum members to trade this strategy only in simulation mode.


Loading instructions:

1) Import functions. The Locked function is the Haar Wavelet and it will expire on 12/25/10 rendering itself and the strategy unusable. {If we collaborate, we're happy to extend this time frame or we may elect to give you the indicator.}

2) Cut and Paste the strategy into a new strategy. Please use NWA_ES_R3.(Thanks)

3) From the screen shots, please follow the setup with particular attention to the DATE RANGE for the data set. The date range is important because variables are initialized in the strategy by a start bar. First bar = 09/26/2010 18:05 EST.

We hope you enjoy the strategy; we'll endeavor to post more in the future.

We would appreciate your comments and questions.

@ Ranger & ZACHARYDW00

Milk-a-What?
Attached Thumbnails
Click image for larger version

Name:	5_yr Equity Curve.jpg
Views:	1228
Size:	101.0 KB
ID:	22064   Click image for larger version

Name:	Chart1.jpg
Views:	1087
Size:	166.2 KB
ID:	22066   Click image for larger version

Name:	Chart2.jpg
Views:	837
Size:	176.5 KB
ID:	22068   Click image for larger version

Name:	Short Term Equity Curve.jpg
Views:	902
Size:	87.8 KB
ID:	22070   Click image for larger version

Name:	Strategy Performance Report.jpg
Views:	1054
Size:	149.0 KB
ID:	22072   Click image for larger version

Name:	Chart3.jpg
Views:	661
Size:	156.2 KB
ID:	22076   Click image for larger version

Name:	Chart6.jpg
Views:	621
Size:	169.9 KB
ID:	22078  
Attached Files
Elite Membership required to download: NWA_ES_R3a.zip
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
Ranger
Port St Lucie, FL
 
Posts: 46 since Jan 2010
Thanks Given: 9
Thanks Received: 48


The strategy posted here runs in Tradestation; it's optimizable and performs in paper trading without issue.

Yesterday while attempting to optimize the strategy from within MC, we noted an error from the "sqrt" function. We checked the related functions and they appear OK.

We'll try to sort the issue and repost as soon as it's resolved.

RANGER

Reply With Quote
  #4 (permalink)
 aviat72 
San Francisco Bay Area
 
Experience: Intermediate
Platform: NT,TOS,IB
Trading: ES,CL,TF
Posts: 281 since Jun 2010
Thanks Given: 161
Thanks Received: 273

Hi

Thanks for sharing it. I unfortunately do not have Tradestation so can not load the files.

From my very basic understanding of NNs, you first need to train them using historical information; this requires you to provide the desired result for the training data. Then when you feed them new data, the expectation is that the NN will produce the desired results based on the history.

Just browzing at the code, I did not understand how the system is setup to train the NN. A pointer will be useful.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
Ranger
Port St Lucie, FL
 
Posts: 46 since Jan 2010
Thanks Given: 9
Thanks Received: 48

Thanks for reviewing our posting. We're working with MC right now to resolve the issue .... 2hrs on Team Viewer, ouch.

We trained the network in Chaos Hunter and exported the results to TS, where we built a committee of models; polling conditions etc. When the model starts to degrade in performance, we will either retune it or replace it.

One of the techniques that we are attempting to employ is that we give MC/TS a pallete of say 5 models. Then we toggle these models from 0 to 1 in an Exhaustive optimization creating a consensus for Entry/Exit conditions.

The output would be something like this:

Long Entry - Use Models 1,3,5.

Short Entry - Use Models 1,3,2, 5

Long Exit - Use Models 1,2

Short Exit - Use Models 3, 5.

Each Model has it's strengths and weaknesses. We would use exhaustive optimization to tell us the contribution of each to Net Profit.

The Networks are trained on the dataset that they were built upon, and this tasking is performed by Chaos Hunter. Hope this answers your question and gives some ideas for future work.

RANGER


aviat72 View Post
Hi

Thanks for sharing it. I unfortunately do not have Tradestation so can not load the files.

From my very basic understanding of NNs, you first need to train them using historical information; this requires you to provide the desired result for the training data. Then when you feed them new data, the expectation is that the NN will produce the desired results based on the history.

Just browzing at the code, I did not understand how the system is setup to train the NN. A pointer will be useful.


Reply With Quote
Thanked by:
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603

Hi,

I've just noticed some of your files are encrypted (non-source) and you've also set an expiration date. We do not allow encrypted (non-source) attachments on futures.io (formerly BMT) for safety reasons. Please replace the attachment.

Also, can you clarify your intent with regards to the expiration date? If you are intending to sell this tool, I'm afraid you are not permitted to post it here or promote it here. Please clarify.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
Ranger
Port St Lucie, FL
 
Posts: 46 since Jan 2010
Thanks Given: 9
Thanks Received: 48

Hi BM

The purpose is clearly outlined in our posting, right?

"The purpose of this posting is as follows:

a) demonstrate our use of Chaos Hunter as we apply it to an intra-day scalping strategy for the ES;

b) generate interest and possibly gain support from other forum members;

c) collaboration with the objective of designing a better predictive algorithms; better money management & risk rules."

We locked one of the files because we are offering a strategy and that shouldn't mean to us that we need to give away proprietary inputs to the general public. We offered to extend the timeframe; and we offered to give away the indicator to those who make a meaningful contribution.

If we elect to sell some of our work at a later date; it will be fully tested; properly documented and used by us before it is ever distributed or advertised, and any advertising will be done at approved places; with proper clearances; and in a professional way.

So to be clear to forum members and BM - we are not selling a product; we are not advertising a product; the indicator is locked because we are posting a strategy for the purposes outlined several times. If that's an issue, BM kindly remove the posting; forum members please accept our apology, and we will post another strategy in the future with full open source.

{Side note - I have not heard back from MC but I'm confident they are pursuing the issue. They mentioned to me that it would take some time to resolve}.

RANGER



Big Mike View Post
Hi,

I've just noticed some of your files are encrypted (non-source) and you've also set an expiration date. We do not allow encrypted (non-source) attachments on futures.io (formerly BMT) for safety reasons. Please replace the attachment.

Also, can you clarify your intent with regards to the expiration date? If you are intending to sell this tool, I'm afraid you are not permitted to post it here or promote it here. Please clarify.

Mike


Reply With Quote
Thanked by:
  #8 (permalink)
Ranger
Port St Lucie, FL
 
Posts: 46 since Jan 2010
Thanks Given: 9
Thanks Received: 48

We never made a live system trade using our own money but today, we elected to go live with an Entry.

Within seconds the strategy jumped short at 1158.25. Having never used strategy generated orders, I wanted to understand the functionality. So, I disabled the strategy after it entered and verified that TS accepted our working stop. After confirmation, I cancelled the stop and placed a bracket order so I could watch the strategy.

I bailed at 1155/3.25 and the strategy bailed at 1153/5.25pts.

Some limited testing but it was fun to watch a computer make a trade.

RANGER

Attached Thumbnails
Click image for larger version

Name:	LiveSystemTrade.jpg
Views:	689
Size:	40.2 KB
ID:	22527   Click image for larger version

Name:	StrategyPerformanceReport_1.jpg
Views:	640
Size:	134.9 KB
ID:	22529   Click image for larger version

Name:	StrategyPerformanceReport_2.jpg
Views:	594
Size:	153.0 KB
ID:	22531  
Reply With Quote
Thanked by:
  #9 (permalink)
Ranger
Port St Lucie, FL
 
Posts: 46 since Jan 2010
Thanks Given: 9
Thanks Received: 48

We pulled together this simple multi-model neural strategy so we could further demonstrate our work. Unlike our previous posting, it's all open source and we verified functionality in MC and TS; there are two separate files.

Please note the initialization instructions in the notes section of the strategy. The ChaosVars on 9/26/10 @ 1805. From within MC you can set the start date 9/26/10 and from within TS 9/27/10.

Over the long haul this strategy looks ugly but you'll notice that it also has good periods. So, how can we turn an ugly strategy into a working strategy? Here's a few ideas if anyone is interested:

a) Because the strategy consists of 2 models, it has 4 x 2 threshold conditions. We could optimize for the best entry/exit combination by toggling the inputs between 0 and 1. For example, model 1 may give the best LE whereas model 2 may only harm the strategy - you get the idea. If you find a good combination, make sure you edit the Entry/Exit flag conditions. You can probably just set them to <=1 before you start; remember there are (4) and after optimization if you find two model conditions work best, you change Entry or Exit flag to take that into account = 2.

b) We could optimize for a stop/profit target in connection with (a) or after we identify the Entry/Exit combinations. Maybe the model will eliminate this requirement.

So, if you have a spare I7 sitting around and some free time, perhaps you can give it a try.

If we botched anything let us know and we'll do our best to correct it.

RANGER

Attached Thumbnails
Click image for larger version

Name:	1Yr_Equity_Curve.jpg
Views:	1741
Size:	142.5 KB
ID:	22552   Click image for larger version

Name:	Equity_Curve_From_Initialization.jpg
Views:	603
Size:	92.4 KB
ID:	22554   Click image for larger version

Name:	Strategy_Performance_Report.jpg
Views:	558
Size:	128.1 KB
ID:	22556   Click image for larger version

Name:	Strategy_Performance_Report_Using_Intialization.jpg
Views:	509
Size:	130.7 KB
ID:	22559  
Attached Files
Elite Membership required to download: 08OCT10_RUN4_5.ELD
Elite Membership required to download: 08Oct10_Run4_5.pla
Reply With Quote
  #10 (permalink)
Ranger
Port St Lucie, FL
 
Posts: 46 since Jan 2010
Thanks Given: 9
Thanks Received: 48


Attached is a NN Strategy and Indicator; we made it simple so that it could optimized for current data - nothing last for ever.

You can start by optimizing for TRIX length Fast & Slow, and occassionally optimize for threshold values. Once you have the appropriate values, you can modify the indicator inputs accordingly.

We noted that a common indication for losing trades vs winning trades are long dwell above/below the threshold value(see zip file screenshots). This strategy / indicator combination can be used for discretionary trading in conjunction with your favorite tools. We checked it over 5 years and the performance is so-so, but when optimized over shorter durations the walkfoward looks hot.

Give it shot; it's untested in MC but should work without an issue.

This might be a good tool for someone who likes TRIX line trading.

RANGER

Attached Thumbnails
Click image for larger version

Name:	NN_TRIX002.jpg
Views:	546
Size:	206.2 KB
ID:	23050   Click image for larger version

Name:	NN_TRIX003.jpg
Views:	447
Size:	190.7 KB
ID:	23052   Click image for larger version

Name:	NN_TRIX004.jpg
Views:	402
Size:	188.2 KB
ID:	23054   Click image for larger version

Name:	NN_TRIX005.jpg
Views:	427
Size:	202.1 KB
ID:	23056   Click image for larger version

Name:	NN_TRIX006.jpg
Views:	437
Size:	189.6 KB
ID:	23058   Click image for larger version

Name:	NN_TRIX007.jpg
Views:	403
Size:	204.6 KB
ID:	23060   Click image for larger version

Name:	NN_TRIX008.jpg
Views:	399
Size:	209.7 KB
ID:	23062   Click image for larger version

Name:	NN_TRIX009.jpg
Views:	378
Size:	200.5 KB
ID:	23064   Click image for larger version

Name:	NN_TRIX010.jpg
Views:	490
Size:	197.7 KB
ID:	23066  
Attached Files
Elite Membership required to download: NN_TRIX STRATEGY & INDICATOR.ELD
Reply With Quote




Last Updated on February 22, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts