diff --git a/experiments/playgroung.ipynb b/experiments/playgroung.ipynb deleted file mode 100644 index 12e1f15..0000000 --- a/experiments/playgroung.ipynb +++ /dev/null @@ -1,492 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "from utils import *\n", - "import pandas as pd\n", - "\n", - "# autoreload \n", - "%load_ext autoreload\n", - "%autoreload 2" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "prices = pd.read_csv(\"../data/prices.csv\", index_col=0, parse_dates=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.1414213562373095" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.sqrt(0.02)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "returns = synthetic_returns(prices)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "returns2 = prices.pct_change()" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[1. , 0.14747197],\n", - " [0.14747197, 1. ]])" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.corrcoef(returns2.dropna().values.flatten(), returns.dropna().values.flatten())" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - " | T0 | \n", - "T1 | \n", - "T3 | \n", - "T4 | \n", - "T5 | \n", - "T6 | \n", - "T7 | \n", - "T8 | \n", - "T9 | \n", - "T10 | \n", - "... | \n", - "T89 | \n", - "T90 | \n", - "T92 | \n", - "T93 | \n", - "T94 | \n", - "T95 | \n", - "T96 | \n", - "T98 | \n", - "T99 | \n", - "T100 | \n", - "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2000-01-04 | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "... | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "NaN | \n", - "
2000-01-05 | \n", - "-0.001454 | \n", - "0.000380 | \n", - "0.005909 | \n", - "0.003457 | \n", - "-0.005594 | \n", - "-0.005661 | \n", - "0.006896 | \n", - "0.000760 | \n", - "0.001963 | \n", - "0.007932 | \n", - "... | \n", - "0.007658 | \n", - "-0.003752 | \n", - "-0.001921 | \n", - "-0.001777 | \n", - "-0.000561 | \n", - "0.002421 | \n", - "-0.000910 | \n", - "-0.005058 | \n", - "0.005528 | \n", - "0.001457 | \n", - "
2000-01-06 | \n", - "-0.005067 | \n", - "-0.001687 | \n", - "0.000715 | \n", - "-0.000934 | \n", - "-0.000332 | \n", - "0.001453 | \n", - "0.002840 | \n", - "-0.000088 | \n", - "-0.000333 | \n", - "-0.001227 | \n", - "... | \n", - "-0.004984 | \n", - "-0.002119 | \n", - "0.002004 | \n", - "-0.001833 | \n", - "0.002670 | \n", - "0.001595 | \n", - "-0.005330 | \n", - "0.002026 | \n", - "0.003262 | \n", - "-0.006554 | \n", - "
2000-01-07 | \n", - "0.005604 | \n", - "-0.000995 | \n", - "-0.000164 | \n", - "-0.004608 | \n", - "-0.008584 | \n", - "-0.000306 | \n", - "0.004896 | \n", - "-0.001971 | \n", - "0.001772 | \n", - "0.000841 | \n", - "... | \n", - "0.005792 | \n", - "0.001142 | \n", - "0.004715 | \n", - "0.000173 | \n", - "0.003328 | \n", - "0.001518 | \n", - "0.009072 | \n", - "-0.004446 | \n", - "0.001961 | \n", - "-0.004652 | \n", - "
2000-01-10 | \n", - "0.001093 | \n", - "0.001036 | \n", - "0.001808 | \n", - "0.000430 | \n", - "-0.001655 | \n", - "-0.001340 | \n", - "-0.006231 | \n", - "0.007149 | \n", - "-0.005827 | \n", - "-0.003586 | \n", - "... | \n", - "-0.004741 | \n", - "0.003890 | \n", - "0.000424 | \n", - "0.002544 | \n", - "0.002860 | \n", - "-0.002889 | \n", - "0.001497 | \n", - "-0.003636 | \n", - "-0.000924 | \n", - "0.003583 | \n", - "
... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "
2023-09-20 | \n", - "0.000672 | \n", - "0.003378 | \n", - "0.003179 | \n", - "-0.005761 | \n", - "0.003475 | \n", - "0.001039 | \n", - "-0.000845 | \n", - "-0.002282 | \n", - "-0.003364 | \n", - "-0.002279 | \n", - "... | \n", - "-0.001770 | \n", - "0.002249 | \n", - "0.002883 | \n", - "-0.003437 | \n", - "-0.005506 | \n", - "0.002603 | \n", - "0.001204 | \n", - "-0.003150 | \n", - "0.003682 | \n", - "0.000884 | \n", - "
2023-09-21 | \n", - "-0.004014 | \n", - "0.000238 | \n", - "-0.002301 | \n", - "0.000503 | \n", - "-0.002554 | \n", - "0.001577 | \n", - "-0.000318 | \n", - "0.007358 | \n", - "0.000760 | \n", - "-0.005215 | \n", - "... | \n", - "-0.002196 | \n", - "0.009500 | \n", - "-0.003946 | \n", - "-0.000513 | \n", - "-0.002119 | \n", - "-0.001317 | \n", - "0.001233 | \n", - "0.001115 | \n", - "0.001266 | \n", - "0.001024 | \n", - "
2023-09-22 | \n", - "-0.001984 | \n", - "0.003389 | \n", - "-0.003966 | \n", - "0.005549 | \n", - "0.002383 | \n", - "-0.005322 | \n", - "0.000990 | \n", - "-0.000638 | \n", - "0.002561 | \n", - "0.003347 | \n", - "... | \n", - "-0.002277 | \n", - "0.003851 | \n", - "-0.000812 | \n", - "-0.000530 | \n", - "-0.005350 | \n", - "-0.006388 | \n", - "-0.004331 | \n", - "0.000208 | \n", - "0.003962 | \n", - "-0.001164 | \n", - "
2023-09-25 | \n", - "0.001255 | \n", - "-0.000491 | \n", - "0.000934 | \n", - "-0.003486 | \n", - "0.002823 | \n", - "0.000936 | \n", - "0.001178 | \n", - "0.002676 | \n", - "0.000966 | \n", - "-0.000768 | \n", - "... | \n", - "-0.002975 | \n", - "-0.002404 | \n", - "0.005076 | \n", - "-0.001225 | \n", - "-0.002615 | \n", - "-0.001526 | \n", - "0.006041 | \n", - "0.001451 | \n", - "0.001280 | \n", - "0.001500 | \n", - "
2023-09-26 | \n", - "-0.002724 | \n", - "-0.003338 | \n", - "0.001998 | \n", - "0.001834 | \n", - "0.000155 | \n", - "0.000516 | \n", - "-0.003293 | \n", - "0.003096 | \n", - "-0.004128 | \n", - "-0.001218 | \n", - "... | \n", - "0.004620 | \n", - "-0.002510 | \n", - "-0.003503 | \n", - "0.008428 | \n", - "-0.001012 | \n", - "-0.000826 | \n", - "-0.000012 | \n", - "-0.000055 | \n", - "0.000907 | \n", - "0.003052 | \n", - "
6191 rows × 75 columns
\n", - "