ML Models:

ML Usecase: Forecasting

Observations- - ARIMA(SARIMA/AUTO-ARIMA/SARIMAX) Forecasting curves/results are turning flat,if trying to forecast results more than 5 days(forecast).As these models are using rolling Simple Moving Average(SMA).While Holt Winter Algo is using rolling Exponential Average(EMA) which is tracking close with original values instead of SMA. Though the markets are seasonal and trending but while seasonality calculation a fixed value cannot be assisgned which will determine "α" as markets are dynamic in nature and seasonality,trends are uncertain in nature, so chances of getting "fasle positive" Forecasting results are very high,same is seen while with actual and forecasted results. - Another Algo are more wrapped inside standard libraries (single line of code) like KATS, AUTO-TS, LSTM,DARTS,GREY KITE. Some give near about correct predictions but complexity/performance parameters are poor,required high GPU/CPU power compared to normal while runnig it one by one for R&D work. Step's Pending for Testing- - Parallel Processing will be one option to execute 5 ML algo's on Normal Machine to get executed below 2-min without any processing issue(High RAM).As more than 100's instruments needs to be processed in real time on hourly/daily/weekly/monthly timeframe. - Monte Carlo(MC) simulations will be performed to get best possible forecasted value out of 10 of Forecasted curves/results, along with 1SD and other statistical parameters though MC will generate different forecasted curves on each run for same timeframe while other algo's forecasted results will not changed with respect to same timeframe's. - As lot of heavy lifting needs to be performed while building ML Forecasting Algo consist of Multiple ML Models embedded in it for all scripts for Equity,futures,Currency and Derivatives. Currently putting on HOLD as plate is already full with some other task can be implemented in dev env.ML is still in at R&D stage. - Thoughts/Suggestion on ML Models are always welcome.Currently looking for models which can forecast for small timeframes for example-forecast for next 7 days.

Holt Winter Algorithm Nifty 50 Forecasting Chart-

HW & MC Forecasting Results:

- A Monte Carlo simulation is a model used to predict the probability of a variety of outcomes when the potential for random variables are present. - It help to explain the impact of risk and uncertainty in prediction and forecasting models.A Monte Carlo simulation requires assigning multiple values to an uncertain variable to achieve multiple results and then averaging the results to obtain an estimate. - It assume perfectly efficient markets. - In NF-50 Forecasting use-case,MC publishing 10 possible Forecasting results based on Trained data and final Forecasted result will "mean" of it. - Another use-case with MC is the geometric Brownian motion (GBM), which is technically a Markov process. This means the stock price follows a random walk and is consistent with (at the very least) the weak form of the efficient market hypothesis (EMH)—past price information is already incorporated, and the next price movement is "conditionally independent" of past price movements.

Holt Winter Algorithm Nifty 50 Training, Testing and Forecasting Chart-

KATS Forecasting ALGO with LSTM for NIFTY 50

KATS Forecasting ALGO with LSTM for USD/INR Currency Pair

As Per KATS Model USD/INR value will be crossing 80 rupees in upcoming months due to geo-political tensions and rising inflation and intrest rates along the global recession fear.
Though the forecasted results are quite unusual, may be KATS Algo is not exact future values but able to forecast upcoming trend.

Ref link- Visit www.livemint.com/news/india/rupee-may-slide-to-80-per-us-dollar-by-june-end

Python Notebooks:

Monte Carlo Algo on INFOSYS: infy_mc_algo.ipynb

KATS,LSTM Forecasting Algo: kats_lstm_forecasting_algo.ipynb

Arima Forecasting Algo: arima_forecasting_algo.ipynb

Monte Carlo Algo on NIFTY: nifty_mc_algo.ipynb