You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model = ag.empModel(dataframe['close'].to_frame(), meanMdl, volMdl, distMdl)
fit model
model.fit()
get the conditional mean
Ey = model.Ey
get conditional variance
ht = model.ht
cvol = np.sqrt(ht)
get standardized residuals
stres = model.stres
make a prediction of mean and variance over next 3 days.
pred = model.predict(nsteps = 3)
pred is a list of two-arrays with first array being prediction of mean
and second array being prediction of variance
AttributeError Traceback (most recent call last)
Cell In[3], line 14
12 model = ag.empModel(dataframe['close'].to_frame(), meanMdl, volMdl, distMdl)
13 # fit model
---> 14 model.fit()
16 # get the conditional mean
17 Ey = model.Ey
File c:\Users\Luca Palese\anaconda3\envs\ta-lib-env\lib\site-packages\armagarch\empModel.py:145, in empModel.fit(self, startingVals, epsilon, acc, iterations, iprint, printTable, estimatesOnly)
143 if startingVals is None:
144 if self._startingVals is None:
--> 145 startingVals = self._startVals()
146 else:
147 startingVals = self._startingVals
File c:\Users\Luca Palese\anaconda3\envs\ta-lib-env\lib\site-packages\armagarch\empModel.py:304, in empModel._startVals(self)
300 def _startVals(self):
301 """
302 Needs to be adjusted
303 """
--> 304 self._mean.data = self._data
305 meanStart = self._mean.startVals
306 volStart = self._vol.startVals
...
63 self._order['MA']), trend=c).fit()
64 if len(model.params) > self._pnum:
65 self._startingValues = model.params[:-1] # remove estimate of variance
AttributeError: module 'statsmodels.tsa' has no attribute 'arima'
The text was updated successfully, but these errors were encountered:
Hi I just installed the armagarch lib ( thanks for that :) ) and I encountered this error:
import armagarch as ag
import matplotlib.pyplot as plt
import numpy as np
define mean, vol and distribution
meanMdl = ag.ARMA(order = {'AR':3,'MA':3})
volMdl = ag.garch(order = {'p':1,'q':1})
distMdl = ag.normalDist()
create a model
model = ag.empModel(dataframe['close'].to_frame(), meanMdl, volMdl, distMdl)
fit model
model.fit()
get the conditional mean
Ey = model.Ey
get conditional variance
ht = model.ht
cvol = np.sqrt(ht)
get standardized residuals
stres = model.stres
make a prediction of mean and variance over next 3 days.
pred = model.predict(nsteps = 3)
pred is a list of two-arrays with first array being prediction of mean
and second array being prediction of variance
AttributeError Traceback (most recent call last)
Cell In[3], line 14
12 model = ag.empModel(dataframe['close'].to_frame(), meanMdl, volMdl, distMdl)
13 # fit model
---> 14 model.fit()
16 # get the conditional mean
17 Ey = model.Ey
File c:\Users\Luca Palese\anaconda3\envs\ta-lib-env\lib\site-packages\armagarch\empModel.py:145, in empModel.fit(self, startingVals, epsilon, acc, iterations, iprint, printTable, estimatesOnly)
143 if startingVals is None:
144 if self._startingVals is None:
--> 145 startingVals = self._startVals()
146 else:
147 startingVals = self._startingVals
File c:\Users\Luca Palese\anaconda3\envs\ta-lib-env\lib\site-packages\armagarch\empModel.py:304, in empModel._startVals(self)
300 def _startVals(self):
301 """
302 Needs to be adjusted
303 """
--> 304 self._mean.data = self._data
305 meanStart = self._mean.startVals
306 volStart = self._vol.startVals
...
63 self._order['MA']), trend=c).fit()
64 if len(model.params) > self._pnum:
65 self._startingValues = model.params[:-1] # remove estimate of variance
AttributeError: module 'statsmodels.tsa' has no attribute 'arima'
The text was updated successfully, but these errors were encountered: