iankhr / armagarch Goto Github PK
View Code? Open in Web Editor NEWARMA-GARCH
License: Other
ARMA-GARCH
License: Other
garch.py in _meanProcess(self, yt, parameters, PQ)
72 print('param: ',parameters)
73 print('param[0]: ',parameters[0])
---> 74 et[i]=float(ey)
75
76 et = yt - et
TypeError: only size-1 arrays can be converted to Python scalars
ey is a matrix, but tries to convert to float.
does not run
...\lib\site-packages\armagarch\ARMA.py in _getStartingVals(self)
60 c = 'nc'
61 try:
---> 62 model = sm.ARMA(self._data.values, (self._order['AR'],self._order['MA'])).fit(trend = c)
63 self._startingValues = model.params
64 except ValueError:
I'm sorry to bother you, I can't use your package to predict the results.
I can use this package to predict arma(4,0)-grach(1,1), but when I bulid arma(4,0)-grach(1,2) there is something wrong, please help me, I'm really in a hurry.
`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
----> 1 pred = model.predict(nsteps = 1)
D:\Anaconda\lib\site-packages\armagarch\empModel.py in predict(self, nsteps, params, data, other)
253 mPred = self._mean.predict(nsteps, params = pars[0], data = data, other = other)
254 # get prediction for volatility
--> 255 vPred = self._vol.predict(nsteps, params = pars[1], data = mdlres['et'], other = other)
256 return [mPred, vPred]
257
D:\Anaconda\lib\site-packages\armagarch\garch.py in predict(self, nsteps, params, data, other)
162 for t in range(nsteps):
163 if self._order['q']>0:
--> 164 prediction[t] = prediction[t] + laght[t:t+self._order['q']][::-1]@beta
165
166 if self._order['p']>0:
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 2 is different from 1)`
I attempted to use your package for the prediction of stock prices using the code of your example as reference. Interestingly, it seems to work fine with some stocks, but with others it generates the following error:
"armagarch.errors.HessianError: Hessian is singular! St.errors are not calculated"
Is there a way to overcome this problem?
Thanks in advance.
Regards,
interesting repo. is this ready to use and to install ? I am using windows environment. I am excited to look for installation and doc.
thank you
regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.