Message Boards Message Boards

2
|
8566 Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Using WolfLang to Dominate the Stock Market

Posted 3 years ago

Hello Wolfram Community!

I have been working on a fun, mildly amusing project using Wolfram Language's FinancialData function with some FinancialIndicators and Machine Learning.

code

I would love to get some feedback from the Mathematica/WolfLang community and I would love to know if anyone has some advice or cool ideas. This is my first major WolfLang package, so I would also love to hear from you if you have any ideas for a better project file layout!

Thanks!

~ Your friendly software engineer, Alec

If you are interested, post a comment!

POSTED BY: Alec Graves
5 Replies

Rohit has given the correct answer, namely that the WL is case sensitive with all inbuilt functions starting with a Capital letter and all concatenated names having each new word begin with a Capital. The problem with the data returned by FinancialData is that it is not regularly spaced and hence cannot be used to estimate the underlying process.:

In[1]:= RegularlySampledQ[FinancialData["EUR/USD",{{2021,5,1},{2021,9,30}}]]
Out[1]= False 

This can be accomplished either by using the TemporalData[data]["Path",All, period] method above, or in two other different ways: either by using

data=TimeSeriesResample[FinancialData["EUR/USD",{{2021,5,1},{2021,9,30}}]]

or

data=TemporalData[FinancialData["EUR/USD",{{2021,5,1},{2021,9,30}}],TemporalRegularity->True] 

Michael

POSTED BY: Michael Kelly
Posted 2 years ago

WL is case sensitive. TemporalData, not temporaldata, TimeSeriesForecast, not timeseriesforecast, forecast, not Forecast, ...

data = TemporalData[
   FinancialData["EUR/USD", {{2021, 5, 1}, {2021, 9, 30}}]]["Part", All, {{2021, 5, 1}, {2021, 9, 30}}];
eproc = EstimatedProcess[data, ARIMAProcess[40, 2, 0]];
forecast = TimeSeriesForecast[eproc, data, {20}];

DateListPlot[{data["Path"], forecast["Path"]},
 Joined -> True,
 Filling -> Axis,
 PlotLabel -> "EUR/USD",
 ImageSize -> 800]

enter image description here

POSTED BY: Rohit Namjoshi
Posted 2 years ago

Hi Mr Kelly,

I would like to thank you for the video about "Random Processes in Finance". I did try to reproduce the code you share on that video and I am getting some error, if could see the code I'd really appreciate it.

Thank you.

The code is:

data = temporaldata[FinancialData["EUR/USD",{{2021,5,1},{2021,9,30}}]] ["Part",All,{{2021,5,1},{2021,9,30}}];

eproc = EstimatedProcess[data, ARIMAProcess[40,2,0]]

forecast = timeseriesforecast[eproc,data,{20}]

DateListPlot[{data["Path"], Forecast["Path"]}, Joined -> True, Filling -> Axis, PlotLabel -> "EUR/USD", ImageSize -> 800]
POSTED BY: Carlos Bahia

Hi Alec

This is a very interesting video, but it is impossible to assess and replicate it without the accompanying code. Is it possible that you could also provide the code by attaching it as a notebook to this webpage?

Thank You Michael Kelly

POSTED BY: Michael Kelly
Posted 3 years ago

My bad! I forgot to link the repository! (edited main post)

POSTED BY: Alec Graves
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract