Skip to content

Commit

Permalink
Add Mid Price Predictors To Regression model (#3)
Browse files Browse the repository at this point in the history
* add mid price predictors for total of 8

* assign cached_mid_prices in decode function

* lasso and ridge

* pr feedback

* equality
  • Loading branch information
joshuaxiao13 authored Apr 11, 2024
1 parent aac29b8 commit c32140f
Show file tree
Hide file tree
Showing 9 changed files with 76,667 additions and 288 deletions.
20,001 changes: 20,001 additions & 0 deletions csv/round-1-island-data-bottle/prices_round_1_day_-1.csv

Large diffs are not rendered by default.

20,001 changes: 20,001 additions & 0 deletions csv/round-1-island-data-bottle/prices_round_1_day_-2.csv

Large diffs are not rendered by default.

20,001 changes: 20,001 additions & 0 deletions csv/round-1-island-data-bottle/prices_round_1_day_0.csv

Large diffs are not rendered by default.

5,371 changes: 5,371 additions & 0 deletions csv/round-1-island-data-bottle/trades_round_1_day_-1_nn.csv

Large diffs are not rendered by default.

5,464 changes: 5,464 additions & 0 deletions csv/round-1-island-data-bottle/trades_round_1_day_-2_nn.csv

Large diffs are not rendered by default.

5,318 changes: 5,318 additions & 0 deletions csv/round-1-island-data-bottle/trades_round_1_day_0_nn.csv

Large diffs are not rendered by default.

34 changes: 13 additions & 21 deletions joshua-notebooks/Manual 1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
"data": {
"text/plain": [
"array([[0. , 0.0099, 0.0392, ..., 1.9208, 0.9801, 0. ],\n",
" [0. , 0.0198, 0.0492, ..., 1.9404, 0.9998, 0.0198],\n",
" [0. , 0. , 0.0784, ..., 1.9984, 1.0581, 0.0784],\n",
" [0. , 0.0099, 0.0393, ..., 1.9305, 0.9899, 0.0099],\n",
" [0. , 0. , 0.0392, ..., 1.9592, 1.0189, 0.0392],\n",
" ...,\n",
" [0. , 0. , 0. , ..., 3.8416, 3.8613, 3.8416],\n",
" [0. , 0. , 0. , ..., 0. , 1.9602, 1.9602],\n",
" [0. , 0. , 0. , ..., 1.9208, 1.9405, 1.9208],\n",
" [0. , 0. , 0. , ..., 0. , 0.9801, 0.9801],\n",
" [0. , 0. , 0. , ..., 0. , 0. , 0. ]])"
]
},
Expand All @@ -58,7 +58,7 @@
"source": [
"for a in range(900, 1001, 1):\n",
" for b in range(a, 1001, 1):\n",
" A[a][b] += (1_000 - a) * (a - 900) * (a - 900) / 5_000\n",
" A[a][b] += (1_000 - a) * (a - 900) * (a - 900) / 10_000\n",
" A[a][b] += (1_000 - b) * (b - a) * (a + b - 1_800) / 10_000\n",
" \n",
"A[900:,900:]"
Expand All @@ -73,7 +73,7 @@
{
"data": {
"text/plain": [
"(961, 982)"
"(952, 978)"
]
},
"execution_count": 4,
Expand All @@ -87,36 +87,28 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"id": "675aba47",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[34.3296, 34.3319, 34.3056, 34.2501, 34.1648],\n",
" [34.3822, 34.3962, 34.3816, 34.3378, 34.2642],\n",
" [34.4 , 34.4259, 34.4232, 34.3913, 34.3296],\n",
" [34.3818, 34.4198, 34.4292, 34.4094, 34.3598],\n",
" [34.3264, 34.3767, 34.3984, 34.3909, 34.3536]])"
"array([[20.2008, 20.2031, 20.1768, 20.1213, 20.036 ],\n",
" [20.1101, 20.1241, 20.1095, 20.0657, 19.9921],\n",
" [20. , 20.0259, 20.0232, 19.9913, 19.9296],\n",
" [19.8699, 19.9079, 19.9173, 19.8975, 19.8479],\n",
" [19.7192, 19.7695, 19.7912, 19.7837, 19.7464]])"
]
},
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"A[958:963, 980:985]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e08af904",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit c32140f

Please sign in to comment.