NexusFi: Find Your Edge


Home Menu

 





ARMA Indicator development


Discussion in NinjaTrader

Updated
    1. trending_up 4,200 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread

ARMA Indicator development

  #1 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

Anyone have or wants to develop this indicator? Looks valuable. I know it probably been posted before, but info is scarce. Heres helpful resources. Difficult to wrap my head around these equations, let alone code them in NT8.

https://en.wikipedia.org/wiki/Autoregressive%E2%80%93moving-average_model

https://www.codeproject.com/Articles/365982/Time-Series-Analysis-in-Csharp-NET-Part-I

https://www.mathdotnet.com/

Real Statistics ARMA Tool | Real Statistics Using Excel

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #3 (permalink)
 tpredictor 
North Carolina
 
Experience: Beginner
Platform: NinjaTrader, Tradestation
Trading: es
Posts: 644 since Nov 2011


ARMA/ARIMA fall into time series forecasting methods. My understanding which is somewhat limited is that it involves offsettings moving averages of various lag lengths to attempt to find correlations, autocorrelation. This seems like it would be more useful for understanding past price action then predicting future action. This would place it in a similar but more statistical/scientific analysis as various cycle methods.

https://www.mathworks.com/help/signal/ug/autocorrelation-of-moving-average-process.html

Reply With Quote
  #4 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

I've looked around, can't figure how to calculate phi and theta of the ARMA.....

Started this thread Reply With Quote
  #5 (permalink)
 tpredictor 
North Carolina
 
Experience: Beginner
Platform: NinjaTrader, Tradestation
Trading: es
Posts: 644 since Nov 2011

I think you will want ARIMA because markets are non stationary. It just means it takes differences to make the model stationary. I believe the coefficients must be found by optimization method. So, you'd need to run it in the optimizer or by looping.

https://msdn.microsoft.com/en-us/library/bb677216.aspx
https://online.stat.psu.edu:443/
https://www.quantstart.com:443/articles/ARIMA-GARCH-Trading-Strategy-on-the-SP500-Stock-Market-Index-Using-R
https://accord-framework.net/intro.html
https://stackoverflow.com/questions/22770352/auto-arima-equivalent-for-python
https://bicorner.com/2015/11/16/time-series-analysis-using-ipython/
https://www.seanabu.com/2016/03/22/time-series-seasonal-ARIMA-model-in-python/
https://www.extremeoptimization.com/QuickStart/CSharp/ArimaModels.aspx
https://stats.stackexchange.com/questions/77663/arima-estimation-by-hand
https://help.xlstat.com/customer/en/portal/articles/2062242-fit-an-arima-model-to-a-time-series-in-excel
https://www.quantstart.com:443/articles/Autoregressive-Integrated-Moving-Average-ARIMA-p-d-q-Models-for-Time-Series-Analysis
https://www.real-statistics.com/time-series-analysis/arima-processes/arima-model-coefficients/
https://www.otexts.org/fpp/8

https://people.duke.edu/~rnau/411arim.htm
in regards to a similar question, I found these answers, quotes from various sources

Quoting 

--
Spreadsheet implementation: ARIMA models such as those described above are easy to implement on a spreadsheet. The prediction equation is simply a linear equation that refers to past values of original time series and past values of the errors. Thus, you can set up an ARIMA forecasting spreadsheet by storing the data in column A, the forecasting formula in column B, and the errors (data minus forecasts) in column C. The forecasting formula in a typical cell in column B would simply be a linear expression referring to values in preceding rows of columns A and C, multiplied by the appropriate AR or MA coefficients stored in cells elsewhere on the spreadsheet.
---

spiderxl Calculating the forecast errors for an ARIMA model is not straight-forward, and without a proper confidence interval, any forecast is worthless.

I strongly recommend to either use a statistical package with Excel Add-in interface (e.g. E-Views, SAS, R, SPSS, S-Plus), or a Econometric excel add-in (e.g. XLStat, NumXL, etc). They all enhance excel analytical capabilities and make econometric type of analysis much easier.

Regards.


Reply With Quote
  #6 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

Thanks. I'll look into it. I have some basic coding skills in c#. Need to hit the books.

Started this thread Reply With Quote
  #7 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

Heres some more info.

https://online.stat.psu.edu:443/

So the elements of ARIMA are AR order, differencing, MA order.(p,d,q)

"Three items should be considered to determine a first guess at an ARIMA model: a time series plot of the data, the ACF, and the PACF."

Seems to be more complex in decision making, then say straight forward moving average, to forecast correctly.

For the elements you have to estimate coefficients. PACF is best for AR estimation, ACF best for MA.

I think Im trying to jump ahead in understanding how to calculate what. Not really grasping the full picture of the process, which seems there is more to it than simply calculating something in order to obtain a correct forecast. My hang up is in understanding how to compute the coefficients for MA and AR. I think the rest i can learn from the excel example.

Started this thread Reply With Quote
  #8 (permalink)
 tpredictor 
North Carolina
 
Experience: Beginner
Platform: NinjaTrader, Tradestation
Trading: es
Posts: 644 since Nov 2011

It looks rather advanced.

Please see the otext resource, I shared earlier:

https://www.otexts.org/fpp/8/6
https://www.otexts.org/fpp/8/7

Reply With Quote
  #9 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

Thank you much. Found this! Compatible with c#! Contains some advanced math, and neuro learning! Have to brush up on my coding.

Accord.NET Machine Learning Framework

Framework modules

https://github.com/accord-net/framework

Started this thread Reply With Quote
Thanked by:
  #10 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19


Found something similar on NT forums, I believe it is auto-regressive only, not sure of the math code accuracy, but its something. Thoughts?

Links and Downloads Manager - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Started this thread Reply With Quote




Last Updated on February 7, 2017


© 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