Created
November 22, 2020 10:21
-
-
Save FlorianHeinrichs/7cce8db8df49720ad1a850cac4c080e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| log_returns = np.log(ticker_df['Open']).diff()[1:] | |
| n = log_returns.shape[0] | |
| test_statistic = n**(1/2) * max(abs(calculate_cusum(log_returns))) | |
| lrv_estimator = estimate_lrv(log_returns) | |
| if test_statistic > quantile * lrv_estimator**(1/2): | |
| print('The null hypothesis can be rejected.') | |
| else: | |
| print('The null hypothesis cannot be rejected.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment