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 46,961 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

  #21 (permalink)
Feidaykin
Paris
 
Posts: 1 since Aug 2009
Thanks Given: 0
Thanks Received: 0

Hello,

Why are you Chaos Hunter and not another Neural Network (FANN, Flood....) ?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
Exit Strategy
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
GFIs1 1 DAX trade per day journal
22 thanks
NexusFi site changelog and issues/problem reporting
22 thanks
The Program
19 thanks
  #22 (permalink)
tortexal
Panama!
 
Posts: 44 since Jun 2009
Thanks Given: 1
Thanks Received: 24


Ranger View Post
Thanks for your posting, please note:

a) Commission 2.4/side; slippage 0 - the trades are market orders.

if you're using market orders then you'd have 12.50 in slippage per side for a total of $25 per RT which is not being acounted for. if you can please enter than amount in your strat properties and report the 1yr performance chart to get a more acurate depiction of what it does


Quoting 
b) These are neural strategies, right? So, they are trained(not over trained) using recent market conditions with a walkforward period. When a model demonstrates satisfactory performance in both ranges, we paper trade the model so we can better understand its performance characteristics. When comfortable, we live trade it.

this is fine to do, but the current 1yr performance is saying that the entire unerlying premiss is not robust at all which is why you have nearly a 100% drawdown in the past year without even taking into consideration slippage


Quoting 
To avoid the ugly dips, we recommend that traders use performance statistic provided by their software; in your case TS. ie model's equity curve based on 900 trades falls outside - 1.5 std deviations; max losers breached; max drawdown breached; degradation of hit rate. These may be early signs of strategy degradation.

what are you doing for money management in general? what risk parameters are defined before you even turn this on?

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



tortexal View Post
if you're using market orders then you'd have 12.50 in slippage per side for a total of $25 per RT which is not being acounted for. if you can please enter than amount in your strat properties and report the 1yr performance chart to get a more acurate depiction of what it does

/////We can't agree with your slippage calculation for the ES.


this is fine to do, but the current 1yr performance is saying that the entire unerlying premiss is not robust at all which is why you have nearly a 100% drawdown in the past year without even taking into consideration slippage

////It seems like you've missed our point. No strategy will work forever; under all market conditions. Traders need to monitor the effectiveness of their strategy as it relates to current market conditions. If you're strategy is no longer performing or appears to have issues, the trader should take appropriate action to avoid the 100% drawdown you outlined.

Are you saying that the determination of how well a strategy works should be measured on a (1) yr timeframe? We can't agree with this either.

what are you doing for money management in general? what risk parameters are defined before you even turn this on?

We have a hard catostrophic stop at a dollar value that we can stomach. Yesterday we stopped out on that value and it was painful, however today appears better.


Please see the purpose of our posting above: We're seeking collaboration to improve our strategies. If you have any suggestions; please post them here and perhaps we can make these better.

Regarding MM: I've personally tried many stopping strategies: hard stops; dynamic stops; bar count stops; you name it. Stops just seem to degrade the performance as do profit targets .... if you see the charts sometimes TRIX has a drawdown of 6 or 7 points (entered to soon), but price typically travels backup above its position for a profit or it gets out. Slow trending conditions can kill the model, if it's on the wrong side of the trade - no idea why or how to prevent it, yet.

It appears that maximizing our entry position and minimizing our loss is the best treatment. We're evaluating this now.

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


Feidaykin View Post
Hello,

Why are you Chaos Hunter and not another Neural Network (FANN, Flood....) ?


We selected Chaos Hunter because we can work with the formulas from within Easy Langauge and Ninja Trader. It has its limitations but Tech Svs is good; the price of the product is fair; and it generates formulas what we can use in conjunction with trading strategies.

RANGER

Reply With Quote
  #25 (permalink)
tortexal
Panama!
 
Posts: 44 since Jun 2009
Thanks Given: 1
Thanks Received: 24


Ranger View Post
We have a hard catostrophic stop at a dollar value that we can stomach. Yesterday we stopped out on that value and it was painful, however today appears better.

if that gets hit every day for the week how much $$ do you lose?



Quoting 
Please see the purpose of our posting above: We're seeking collaboration to improve our strategies. If you have any suggestions; please post them here and perhaps we can make these better.

understoodd whats why im reccomending you incluse the full cost of the xaction (comission and slippage) so that you are able to build a strategy around more realistic conditions.

as far as money management, i can say from doing this on the inst side, money management IS the game regardless if youre using a NN strat, defined rules etc. the system doesnt matter if the money management is ineffective. I would also add that stops or targets degrading performace is another example of the underlying premiss not being robust enough for real use.

something to think about when trying to imporove the performance

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


tortexal View Post
if that gets hit every day for the week how much $$ do you lose?


////Tortexal - again, thank you for your comments.

To answer your question, our Stop is 1K on NN_TRIX; it's 500 on NWA_ES - 5K & 2.5K respectively.

It would be impossible for the Stop to be hit more than 3/wk or 3/day because we would take the model out of service until such time that it could either be repaired or demonstrated renewed performance.

refering to NN_TRIX

Max consecutive losers = 6;
Number of stops hit since 9/26 = 1;
Observation of Equity Curve;
Number of consecutive losing days = 3;

TRIX had it's stop hit Thursday; it made 4 trades; 3 losers. It had our attention because that was first time that the stop was ever hit. Friday the strategy came back with 6 trades; 6 winners for 13+ points. If the model failed to turn-in a winning day Friday, it would have busted its statistic of Number of consecutive losing days of 3, which would be cause to re-evaluate performance.




understoodd whats why im reccomending you incluse the full cost of the xaction (comission and slippage) so that you are able to build a strategy around more realistic conditions.

/// we include the cost of commission. We place in our strategy calculations the amount we actually pay. Pertaining to slippage, when we see repeated examples of where our fill wasn't ticked through then naturally we will include slippage for our use. Currently there are only a few examples of this and for the most part, price moves against our positions once filled. So deducting 25 dollars from each trade unfairly penalizes the strategy.

In any event, users have the full code; they can modify; optimize; use; don't use.

as far as money management, i can say from doing this on the inst side, money management IS the game regardless if youre using a NN strat, defined rules etc. the system doesnt matter if the money management is ineffective. I would also add that stops or targets degrading performace is another example of the underlying premiss not being robust enough for real use.

///// If you mean Money Management in terms of Net Profit and avoiding catastophic loss then we agree with your comment about money management. Someone taught us that we need to have hard stops and hard profit targets - why? Is it possible to build a strategy that creates its own PT and SL positions dynamically?

We listen to what others tell us but we're also searching for something a little more creative, hence the purpose of our posting.

Do you have a winning strategy to share?



something to think about when trying to imporove the performance


RANGER

Reply With Quote
  #27 (permalink)
tortexal
Panama!
 
Posts: 44 since Jun 2009
Thanks Given: 1
Thanks Received: 24


Quoting 
////Tortexal - again, thank you for your comments.


Quoting 

To answer your question, our Stop is 1K on NN_TRIX; it's 500 on NWA_ES - 5K & 2.5K respectively.

It would be impossible for the Stop to be hit more than 3/wk or 3/day because we would take the model out of service until such time that it could either be repaired or demonstrated renewed performance.

refering to NN_TRIX

Max consecutive losers = 6;
Number of stops hit since 9/26 = 1;
Observation of Equity Curve;
Number of consecutive losing days = 3;

TRIX had it's stop hit Thursday; it made 4 trades; 3 losers. It had our attention because that was first time that the stop was ever hit. Friday the strategy came back with 6 trades; 6 winners for 13+ points. If the model failed to turn-in a winning day Friday, it would have busted its statistic of Number of consecutive losing days of 3, which would be cause to re-evaluate performance.

if its 5k and 2.5 per week, for the month the amount you're willing to lose regardless if you turn the system off or not is $20,000 and $10,000 per month. initial margin on a mini is what 5600? This in turn means you are willing to take a 357% and 178% loss on margin per month per contract. Definitely something i would NOT run with my money... nor would i take that risk playing poker

if i were a client and you were running money for me, i would NOT want turning the system on off mid month to be at your descression. that should be pre defined within system rules to eliminate human error.


Quoting 
/// we include the cost of commission. We place in our strategy calculations the amount we actually pay. Pertaining to slippage, when we see repeated examples of where our fill wasn't ticked through then naturally we will include slippage for our use. Currently there are only a few examples of this and for the most part, price moves against our positions once filled. So deducting 25 dollars from each trade unfairly penalizes the strategy.


Quoting 

In any event, users have the full code; they can modify; optimize; use; don't use.

if you are using markets orders, you have ZERO way of forecasting how many times they will get filled at the last price vs above or below for short or long. NONE. If you use lmt orders you can then get away from including slippage. Its also not a $25 penalty per trade, its 12.50 per trade and 25 per round turn. And it does NOT penalize the performance. it make the performance more realistic and conservative. you STILL have the possibity of having more or less slippage even when you include it in your testing. What if you get stopped out during an FOMC statement? You think there will not be any slippage in there?

as far as compiling the code, i cant:
line 136: _HWT = (HaarWT(jtHMA(Close,3),4,2,FALSE)/10);
jtHMA isnt defined anywhere as far as i can tell

Reply With Quote
  #28 (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,399 since Jun 2009
Thanks Given: 33,173
Thanks Received: 101,539

Here is the jtHMA I have for MultiCharts. Name: jtJMA, Function:

 
Code
                            
{jtHMA Hull Moving Average Function}

{
AuthorAtavachron}
{
May 2005}

Inputsprice(NumericSeries), length(NumericSimple);
VarshalvedLength(0), sqrRootLength(0);

{
Original equation is:
---------------------
waverage(2*waverage(close,period/2)-waverage(close ,period), SquareRoot(Period)
Implementation below is more efficient with lengthy Weighted Moving Averages.
In additionthe length needs to be converted to an integer value after it is halved and
its square root is obtained in order for this to work with Weighted Moving Averaging
}

if ((
ceiling(length 2) - (length 2)) <= 0.5then
halvedLength 
ceiling(length 2)
else
halvedLength floor(length 2);

if ((
ceiling(SquareRoot(length)) - SquareRoot(length)) <= 0.5then
sqrRootLength 
ceiling(SquareRoot(length))
else
sqrRootLength floor(SquareRoot(length));

Value1 WAverage(pricehalvedLength);
Value2 WAverage(pricelength);
Value3 WAverage((Value1 Value2), sqrRootLength);

jtHMA Value3
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:
  #29 (permalink)
 
bizman70's Avatar
 bizman70 
toronto, ontario
 
Experience: Intermediate
Platform: ninja trader
Broker: sterling, iqfeed
Trading: es, nq, 6e
Posts: 363 since May 2010
Thanks Given: 41
Thanks Received: 140

how long do you back test a strategy compare to the walk forward ratio - you mentioned that you do the back test for approx 2 months - what about the woralk forward

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



tortexal View Post
if its 5k and 2.5 per week, for the month the amount you're willing to lose regardless if you turn the system off or not is $20,000 and $10,000 per month. initial margin on a mini is what 5600? This in turn means you are willing to take a 357% and 178% loss on margin per month per contract. Definitely something i would NOT run with my money... nor would i take that risk playing poker

if i were a client and you were running money for me, i would NOT want turning the system on off mid month to be at your descression. that should be pre defined within system rules to eliminate human error.


if you are using markets orders, you have ZERO way of forecasting how many times they will get filled at the last price vs above or below for short or long. NONE. If you use lmt orders you can then get away from including slippage. Its also not a $25 penalty per trade, its 12.50 per trade and 25 per round turn. And it does NOT penalize the performance. it make the performance more realistic and conservative. you STILL have the possibity of having more or less slippage even when you include it in your testing. What if you get stopped out during an FOMC statement? You think there will not be any slippage in there?

as far as compiling the code, i cant:
line 136: _HWT = (HaarWT(jtHMA(Close,3),4,2,FALSE)/10);
jtHMA isnt defined anywhere as far as i can tell

//////Thanks for your valuable input Tortexal - everything that you said has merit.

//////Pertaining to your calculation of loss: we will never see the losses outlined by you because we follow our strategies performance. Can we recommend some statistical methods to keep you from falling into the dip you noted on the 1 year chart. I guess that if you were trading the first part of the curve you would have been quite happy; and the last part of the curve on the (1) year chart. Can you think of any statistical methods that might keep you from entering the extended drawdown phase? How about an EMA of the equity curve +/- x std; How about evaluating the statistical basis(as designed) vs actual performance.


////If I were a client; I'd expect someone to turn the model off as soon as it proved that it was failing. The only way to do that is by following its performance statistics. When we used Tradecision; we used model performance within our strategies. When the model started running rough, it was disallowed to trade. We'll likely work-up some metrics going forward and include them as conditions in the strategy.

/////I did say trade whereas I meant $25/RT. Feel free to change your code to limit orders.


@BM - thanks friend for posting the code for jtHMA.

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