Open BEbillionaireUSD opened 2 years ago
Could you share your sample data for which this library didn't work? It would help me resolving the issue.
Sure! It's so nice of you to reply me so quickly. tmp.txt
The sequence is in the seq.txt file and the observation starts at 0 and ends at 844.
I think it is difficult to apply a Hawkes process to your data, because, in your dataset, all the data points are integer and the same value is repeated several times. I feel It would be better to employ discrete-time models for your case.
Hi, I faced with similar problem.
d:\Tez\Hawkes\Hawkes\model.py:692: RuntimeWarning: overflow encountered in multiply
Int = ( g*(1-r)/beta ).sum()
d:\Tez\Hawkes\Hawkes\model.py:693: RuntimeWarning: overflow encountered in multiply
g = g*r
d:\Tez\Hawkes\Hawkes\model.py:701: RuntimeWarning: overflow encountered in multiply
g_b = g_b*r - g*step
d:\Tez\Hawkes\Hawkes\model.py:701: RuntimeWarning: invalid value encountered in subtract
g_b = g_b*r - g*step
d:\Tez\Hawkes\Hawkes\model.py:183: RuntimeWarning: invalid value encountered in divide
G = { key: (dl[key]/l).sum(axis=-1) - dInt[key] for key in dl }
My data is returns.txt
and my code is
itv = [-1,10]
h2 = hk.estimator().set_kernel('exp').set_baseline('const')
h2.fit(returns,itv,opt=['print'])
When I enabled print, the output is:
...
32
{'mu': 7.4174034730288625, 'alpha': 0.9177978222695085, 'beta': 601.8450378720826}
L = 49262.618, norm(G) = 4.774537e+04
33
{'mu': 7.415109600152086, 'alpha': 0.9178830564619231, 'beta': 735.0951892419736}
L = 59826.811, norm(G) = 5.824598e+04
34
{'mu': 7.413234043852897, 'alpha': 0.9179523864372038, 'beta': 897.8472916504186}
L = 72715.710, norm(G) = 7.106981e+04
35
{'mu': 7.411699239771285, 'alpha': 0.9180089541532814, 'beta': 1096.6331584284596}
L = 88443.675, norm(G) = 8.673119e+04
36
{'mu': 7.410442540456336, 'alpha': 0.918055212475346, 'beta': 1339.4307643944192}
L = 107638.953, norm(G) = 1.058584e+05
d:\Tez\Hawkes\Hawkes\model.py:692: RuntimeWarning: overflow encountered in multiply
Int = ( g*(1-r)/beta ).sum()
d:\Tez\Hawkes\Hawkes\model.py:693: RuntimeWarning: overflow encountered in multiply
g = g*r
d:\Tez\Hawkes\Hawkes\model.py:701: RuntimeWarning: overflow encountered in multiply
g_b = g_b*r - g*step
d:\Tez\Hawkes\Hawkes\model.py:701: RuntimeWarning: invalid value encountered in subtract
g_b = g_b*r - g*step
d:\Tez\Hawkes\Hawkes\model.py:183: RuntimeWarning: invalid value encountered in divide
G = { key: (dl[key]/l).sum(axis=-1) - dInt[key] for key in dl }
37
{'mu': 7.409413342693876, 'alpha': 0.9180930751605922, 'beta': 1635.9844299959282}
L = inf, norm(G) = nan
38
{'mu': nan, 'alpha': nan, 'beta': nan}
L = nan, norm(G) = nan
39
{'mu': nan, 'alpha': nan, 'beta': nan}
L = nan, norm(G) = nan
40
{'mu': nan, 'alpha': nan, 'beta': nan}
L = nan, norm(G) = nan
41
{'mu': nan, 'alpha': nan, 'beta': nan}
L = nan, norm(G) = nan
...
Could you help me, please. Thanks.
Hi, I met a troublesome issue. My event sequence is relatively long (with the length of 6000 that is split into 169 sub-intervals). The program generates a warning:
It seems the resulting parameters are too large. Could you please give me some suggestions with such a situation? My codes:
I would be really grateful if you could give me some help. Thanks in advance!
BTW, I also met another issue:
when I set the baseline as 'plinear' and the kernel as 'nonpara'.