Giter VIP home page Giter VIP logo

Comments (3)

bashtage avatar bashtage commented on August 17, 2024

Could you post more of your code? I isn't clear what result is coming from.

from arch.

maryam1986safari avatar maryam1986safari commented on August 17, 2024

resid_predict = return[-splitDate: ] - ARIMA_model.predict (start=splitDate, end=end_date)

y= pd.concat ([ ARIMA_model.resid.dropna() , resid_predict ])

model_set= arch_model(y=y, mean = 'zero', vol= 'GARCH', dist='t', p=1 , o=0, q=1)

result= model_set.fit(disp = 'off', last_obs=splitDate)

frcst = result.forecast(horizon=1, start=splitDate, method="simulation", simulations=30 *50)
frcst_variance=frcst.variance .squeeze()
realized_volatility= realized_volatility(n_period=30)

fig, ax = plt.subplots(figsize= (12,6))
ax.plot(result.conditional_volatility, "green",
np.sqrt(frcst_variance), "red" ,
realized_volatility, "blue")

image

if I set (7,7) for orders of GARCH then:

image

from arch.

maryam1986safari avatar maryam1986safari commented on August 17, 2024

I have another related question. it would be great if it got clear to me. I just change the length of out-of-sample set (test set). it was 30 (days) and I changed it to 5. then in-sample prediction of model which is in fact the conditionally variance again is illustrated by green line. It seems there has been no change in in-sample perdition in last 25 days of train set (in comparison to when I had set the length of test set equal to 30). is this can be considered as evidence that modeling process is taking the test set into the account when the model is building?
image

from arch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.