NexusFi: Find Your Edge


Home Menu

 





Experimental one step AForge-based NN predictor for OHLC data (Neural Network)


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one bnichols with 11 posts (30 thanks)
    2. looks_two NJAMC with 8 posts (4 thanks)
    3. looks_3 Big Mike with 3 posts (0 thanks)
    4. looks_4 patbateman with 3 posts (1 thanks)
      Best Posters
    1. looks_one bnichols with 2.7 thanks per post
    2. looks_two gregid with 2 thanks per post
    3. looks_3 NJAMC with 0.5 thanks per post
    4. looks_4 patbateman with 0.3 thanks per post
    1. trending_up 16,160 views
    2. thumb_up 37 thanks given
    3. group 22 followers
    1. forum 29 posts
    2. attach_file 5 attachments




 
Search this Thread

Experimental one step AForge-based NN predictor for OHLC data (Neural Network)

  #11 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Just a comment and a head's up.

First, fixed the computer running the test by restoring the operating system to a point prior to the last update. Wonder if it was something I did or whether Microsoft will issue an "oops..." statement at some point.

Second, there are signs of a bug in the DLL code to do with normalization of the OHLC vector passed to it by the NT strategy. Proper normalization is absolutely vital to proper function and as a consequence the DLL code (NNPredictor.cs) is under the scalpel as we speak. Am using the opportunity to add support for networks with an expanded number of input OHLC vectors (up to 30 at the moment), since while the network development system (TDOHLC) can create such trained networks the DLL code is restricted to a single 4-feature input vector (topic alluded to by @sptrader). Also adding additional entry points, mostly to return system status and hence mostly to simplify debugging. Will list these explicitly when the updated DLL project is released, hopefully this week.

ETA: Should clarify that right now the NT strategy does not support strategy analysis (e.g., backtesting)--meant for forward, real time use only. However, after talking with my son (who implemented the strategy on his system and is providing invaluable feedback) backtesting suddenly makes infinite sense and have begun looking into it--hope next release will include that as well.

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Deepmoney LLM
Elite Quantitative GenAI/LLM
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Better Renko Gaps
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
24 thanks
The Program
18 thanks
  #12 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394

Hi @bnichols,

I don't want to detract from your current efforts but wondered if you had see this thread about Particle Swarm Optimization (Artificial Bee Colony's):


I would be interested in any of your feedback having studied NN.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #13 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460


Howdy [MENTION=11447]NJAMC[/MENTION]. I took a peek at the thread last week, about the same time I looked at the next gen of the NN code being developed here (not ready to post yet), and decided I wasn't ready to tackle either project. That will doubtless change as winter approaches and the walls start closing in.

At this stage I'm pretty much focused on improving my trading know-how, adding to the repertoire of AI techniques & optimizations not so much at the moment, first because as much as I love the AI concept so far every attempt I'm made to apply it to trading has produced the same well known result; namely, it works more or less if the problem one is trying to solve (e.g., predicting daily S&P close) provides enough significant independent variables, and not so well otherwise (performance in general less than so-so, for which problems, like a dog walking on its hind legs, if Sam Johnson were alive today might point out the surprise is not that NN does it badly, but that it does it at all). Unfortunately my current obsession (short time frame spot currency) falls somewhat into the latter category.

A second reason I'm more focused on trading than AI at the moment is that experience teaches without a profitable system & sound knowledge of what makes it profitable on the one hand, any AI technique on the other hand remains a solution looking for a problem.

I will look at the ABC technique at some point (which means code it in C# as a precursor to implementing in NT if I can't lay my hands on existing code (e.g., this code referred to by [MENTION=745]gregid[/MENTION] in post 11 of your thread), and run some tests) but can't say at the moment when that will be....might be sooner rather than later however, since although not afflicted by Attention Deficit Disorder as such, I'm easily distracted

In the meantime I look forward to following your thread !

PS: To come up to speed (PacRim currency market very slow) created 2 VS 2010 Ultimate C# projects to compare the console app code referred to above with your code as discussed in your thread and will take a look at the NT strategy you constructed.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #14 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 650 since Aug 2009
Thanks Given: 320
Thanks Received: 623


bnichols View Post
A second reason I'm more focused on trading than AI at the moment is that experience teaches without a profitable system & sound knowledge of what makes it profitable on the one hand, any AI technique on the other hand remains a solution looking for a problem.

@bnichols
Too often people (myself included) fall in the trap and fiddle with the AI with the expectation that it will tell the strategy:
"What, Why, How and When"

When reality (that I constantly need to remind myself) is that what AI is good for is for automation of your already well defined "What, Why and How" by giving you the answer to "WHEN" question

Reply With Quote
Thanked by:
  #15 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394


bnichols View Post
Howdy [MENTION=11447]NJAMC[/MENTION]. I took a peek at the thread last week, about the same time I looked at the next gen of the NN code being developed here (not ready to post yet), and decided I wasn't ready to tackle either project. That will doubtless change as winter approaches and the walls start closing in.

At this stage I'm pretty much focused on improving my trading know-how, adding to the repertoire of AI techniques & optimizations not so much at the moment, first because as much as I love the AI concept so far every attempt I'm made to apply it to trading has produced the same well known result; namely, it works more or less if the problem one is trying to solve (e.g., predicting daily S&P close) provides enough significant independent variables, and not so well otherwise (performance in general less than so-so, for which problems, like a dog walking on its hind legs, if Sam Johnson were alive today might point out the surprise is not that NN does it badly, but that it does it at all). Unfortunately my current obsession (short time frame spot currency) falls somewhat into the latter category.

A second reason I'm more focused on trading than AI at the moment is that experience teaches without a profitable system & sound knowledge of what makes it profitable on the one hand, any AI technique on the other hand remains a solution looking for a problem.

I will look at the ABC technique at some point (which means code it in C# as a precursor to implementing in NT if I can't lay my hands on existing code (e.g., this code referred to by [MENTION=745]gregid[/MENTION] in post 11 of your thread), and run some tests) but can't say at the moment when that will be....might be sooner rather than later however, since although not afflicted by Attention Deficit Disorder as such, I'm easily distracted

In the meantime I look forward to following your thread !

PS: To come up to speed (PacRim currency market very slow) created 2 VS 2010 Ultimate C# projects to compare the console app code referred to above with your code as discussed in your thread and will take a look at the NT strategy you constructed.


There are a few versions of NT trading strategies on that tread you can play with as well. Myself and @Luger have put source code out that autotrade based upon the Bee Hive output. Look forward to your insight in the future.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
  #16 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394


gregid View Post
Too often people (myself included) fall in the trap and fiddle with the AI with the expectation that it will tell the strategy:
"What, Why, How and When"

When reality (that I constantly need to remind myself) is that what AI is good for is for automation of your already well defined "What, Why and How" by giving you the answer to "WHEN" question

True, the biggest problem with the ABC system is defining the Nectar for the bees. Then what do you do with the solution once the bees find it?

The nice part is the ABC system can review large quantities of independent variables (assuming the hive can understand them) to produce a single solution and if configured correctly will adapt to the market conditions.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
  #17 (permalink)
 
patbateman's Avatar
 patbateman 
NY, NY
 
Experience: None
Platform: T4, NinjaTrader
Trading: All!
Posts: 235 since Mar 2012
Thanks Given: 113
Thanks Received: 200


gregid View Post
@bnichols
Too often people (myself included) fall in the trap and fiddle with the AI with the expectation that it will tell the strategy:
"What, Why, How and When"

When reality (that I constantly need to remind myself) is that what AI is good for is for automation of your already well defined "What, Why and How" by giving you the answer to "WHEN" question

First rate answer

"A Jedi's strength flows from the force."
-Yoda
Reply With Quote
  #18 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394


bnichols View Post
The beta of the NT interface for a 1-step predictor is in forward testing with an 1800 Tick EUR/USD chart, online so far for 6 hours (mid European session through start of N. American). It has been implemented as a strategy and a DLL (DLL in c# built with .Net 3.0 for compatibility with NT).

@bnichols,

Is there a good source of information on the AForge API? I don't seem to be able to find much of a manual on the library.

Thanks,

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
  #19 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Howdy [MENTION=11447]NJAMC[/MENTION]: Agree SourceForge documentation can be sparse. The "API" I use is DLLs created by a Microsoft code development product (currently Visual Studio 2010 Ultimate) and spend most of my time trying to interface the DLL with NT--my chosen battle being the NT DLL interface . Is this along the lines of what you're looking for? If so I can help with that.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #20 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394



bnichols View Post
Howdy [MENTION=11447]NJAMC[/MENTION]: Agree SourceForge documentation can be sparse. The "API" I use is DLLs created by a Microsoft code development product (currently Visual Studio 2010 Ultimate) and spend most of my time trying to interface the DLL with NT--my chosen battle being the NT DLL interface . Is this along the lines of what you're looking for? If so I can help with that.

@bnichols,

I am looking at training a multilayered network,but un-sure how to do that?

Usually there is a .Train() type of method, but don't see it. It almost seems like you need to develop the weights externally and then load them into AForge?

Is there sample code somewhere for other projects?

Thanks,

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote




Last Updated on May 19, 2020


© 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