This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from statsmodels.regression.linear_model import OLS | |
from statsmodels.tsa.tsatools import lagmat, add_trend | |
from statsmodels.tsa.adfvalues import mackinnonp | |
def adf(ts): | |
""" | |
Augmented Dickey-Fuller unit root test | |
""" | |
# make sure we are working with an array, convert if necessary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hurst(ts): | |
""" | |
Returns the Hurst Exponent of the time series vector ts | |
""" | |
# make sure we are working with an array, convert if necessary | |
ts = np.asarray(ts) | |
# Helper variables used during calculations | |
lagvec = [] | |
tau = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def variance_ratio(ts, lag = 2): | |
""" | |
Returns the variance ratio test result | |
""" | |
# make sure we are working with an array, convert if necessary | |
ts = np.asarray(ts) | |
# Apply the formula to calculate the test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def half_life(ts): | |
""" | |
Calculates the half life of a mean reversion | |
""" | |
# make sure we are working with an array, convert if necessary | |
ts = np.asarray(ts) | |
# delta = p(t) - p(t-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from statsmodels.regression.linear_model import OLS | |
from statsmodels.tsa.tsatools import lagmat, add_trend | |
from statsmodels.tsa.adfvalues import mackinnonp | |
def adf(ts, maxlag=1): | |
""" | |
Augmented Dickey-Fuller unit root test | |
""" | |
# make sure we are working with an array, convert if necessary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from statsmodels.tsa.tsatools import lagmat | |
def johansen(ts, lags): | |
""" | |
Calculate the Johansen Test for the given time series | |
""" | |
# Make sure we are working with arrays, convert if necessary | |
ts = np.asarray(ts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.1</TargetFramework> | |
<RuntimeIdentifiers>ubuntu.18.04-x64</RuntimeIdentifiers> | |
</PropertyGroup> | |
<ItemGroup> | |
<Folder Include="wwwroot\" /> | |
</ItemGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
demoapi (1.0-0ubuntu1) bionic; urgency=medium | |
* Initial Release. | |
-- Bluekiri Demo <[email protected]> Tue, 13 Nov 2018 08:23:08 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: demoapi | |
Section: net | |
Priority: optional | |
Maintainer: Bluekiri Demo <[email protected]> | |
Build-Depends: debhelper (>= 10), dh-systemd | |
Standards-Version: 4.1.2 | |
Homepage: https://github.com/bluekiri/demoapi | |
Package: demoapi | |
Architecture: any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/make -f | |
#export DH_VERBOSE = 1 | |
%: | |
dh $@ --with=systemd | |
override_dh_auto_build: | |
dotnet publish -c Release --self-contained -r ubuntu.18.04-x64 | |
# auto-build disabled |
OlderNewer