Skip to content

Commit 2e98b45

Browse files
committed
fix sharpe calc in feature neutralization, add line about importance of BMC in target ensemble
1 parent bee449d commit 2e98b45

File tree

2 files changed

+37
-35
lines changed

2 files changed

+37
-35
lines changed

feature_neutralization.ipynb

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": 1,
24+
"execution_count": null,
2525
"metadata": {
2626
"colab": {
2727
"base_uri": "https://localhost:8080/"
@@ -77,7 +77,7 @@
7777
},
7878
{
7979
"cell_type": "code",
80-
"execution_count": 2,
80+
"execution_count": null,
8181
"metadata": {
8282
"colab": {
8383
"base_uri": "https://localhost:8080/",
@@ -486,7 +486,7 @@
486486
"id": "meowEBs-PwtB",
487487
"outputId": "c2a28036-734c-4768-bac3-9bf2cfb3cf7e"
488488
},
489-
"execution_count": 3,
489+
"execution_count": null,
490490
"outputs": [
491491
{
492492
"output_type": "stream",
@@ -510,7 +510,7 @@
510510
},
511511
{
512512
"cell_type": "code",
513-
"execution_count": 4,
513+
"execution_count": null,
514514
"metadata": {
515515
"colab": {
516516
"base_uri": "https://localhost:8080/",
@@ -582,7 +582,7 @@
582582
},
583583
{
584584
"cell_type": "code",
585-
"execution_count": 5,
585+
"execution_count": null,
586586
"metadata": {
587587
"colab": {
588588
"base_uri": "https://localhost:8080/",
@@ -1238,7 +1238,7 @@
12381238
},
12391239
{
12401240
"cell_type": "code",
1241-
"execution_count": 6,
1241+
"execution_count": null,
12421242
"metadata": {
12431243
"colab": {
12441244
"base_uri": "https://localhost:8080/",
@@ -1301,7 +1301,7 @@
13011301
},
13021302
{
13031303
"cell_type": "code",
1304-
"execution_count": 7,
1304+
"execution_count": null,
13051305
"metadata": {
13061306
"colab": {
13071307
"base_uri": "https://localhost:8080/",
@@ -1345,7 +1345,7 @@
13451345
},
13461346
{
13471347
"cell_type": "code",
1348-
"execution_count": 8,
1348+
"execution_count": null,
13491349
"metadata": {
13501350
"colab": {
13511351
"base_uri": "https://localhost:8080/",
@@ -1387,7 +1387,7 @@
13871387
},
13881388
{
13891389
"cell_type": "code",
1390-
"execution_count": 9,
1390+
"execution_count": null,
13911391
"metadata": {
13921392
"colab": {
13931393
"base_uri": "https://localhost:8080/",
@@ -1464,7 +1464,7 @@
14641464
"id": "0nm5VBXy4UBK",
14651465
"outputId": "ea7fd355-e3f1-49ee-b485-463b1c7cfbe7"
14661466
},
1467-
"execution_count": 10,
1467+
"execution_count": null,
14681468
"outputs": [
14691469
{
14701470
"output_type": "stream",
@@ -1509,7 +1509,7 @@
15091509
},
15101510
{
15111511
"cell_type": "code",
1512-
"execution_count": 11,
1512+
"execution_count": null,
15131513
"metadata": {
15141514
"id": "1fZmZVFuyu-T",
15151515
"colab": {
@@ -1564,7 +1564,7 @@
15641564
},
15651565
{
15661566
"cell_type": "code",
1567-
"execution_count": 12,
1567+
"execution_count": null,
15681568
"metadata": {
15691569
"colab": {
15701570
"base_uri": "https://localhost:8080/",
@@ -1639,7 +1639,7 @@
16391639
},
16401640
{
16411641
"cell_type": "code",
1642-
"execution_count": 13,
1642+
"execution_count": null,
16431643
"metadata": {
16441644
"colab": {
16451645
"base_uri": "https://localhost:8080/",
@@ -1713,7 +1713,7 @@
17131713
},
17141714
{
17151715
"cell_type": "code",
1716-
"execution_count": 14,
1716+
"execution_count": null,
17171717
"metadata": {
17181718
"colab": {
17191719
"base_uri": "https://localhost:8080/",
@@ -2158,7 +2158,7 @@
21582158
},
21592159
{
21602160
"cell_type": "code",
2161-
"execution_count": 15,
2161+
"execution_count": null,
21622162
"metadata": {
21632163
"colab": {
21642164
"base_uri": "https://localhost:8080/",
@@ -2239,7 +2239,7 @@
22392239
},
22402240
{
22412241
"cell_type": "code",
2242-
"execution_count": 16,
2242+
"execution_count": null,
22432243
"metadata": {
22442244
"colab": {
22452245
"base_uri": "https://localhost:8080/",
@@ -2290,7 +2290,7 @@
22902290
},
22912291
{
22922292
"cell_type": "code",
2293-
"execution_count": 17,
2293+
"execution_count": null,
22942294
"metadata": {
22952295
"colab": {
22962296
"base_uri": "https://localhost:8080/",
@@ -2623,7 +2623,7 @@
26232623
},
26242624
{
26252625
"cell_type": "code",
2626-
"execution_count": 18,
2626+
"execution_count": null,
26272627
"metadata": {
26282628
"colab": {
26292629
"base_uri": "https://localhost:8080/",
@@ -2721,7 +2721,7 @@
27212721
"id": "76IGP1UGnzNW",
27222722
"outputId": "203424ad-7c67-4a3b-aa09-5fd255c68a35"
27232723
},
2724-
"execution_count": 19,
2724+
"execution_count": null,
27252725
"outputs": [
27262726
{
27272727
"output_type": "stream",
@@ -2763,7 +2763,7 @@
27632763
},
27642764
{
27652765
"cell_type": "code",
2766-
"execution_count": 20,
2766+
"execution_count": null,
27672767
"metadata": {
27682768
"colab": {
27692769
"base_uri": "https://localhost:8080/",
@@ -3165,12 +3165,12 @@
31653165
"for col in group_neutral_cols:\n",
31663166
" corr_mean = group_neutral_corr[col].mean()\n",
31673167
" corr_std = group_neutral_corr[col].std()\n",
3168-
" corr_sharpe = mean / std\n",
3168+
" corr_sharpe = corr_mean / corr_std\n",
31693169
" corr_rolling_max = group_neutral_cumsum[col].expanding(min_periods=1).max()\n",
31703170
" corr_max_drawdown = (corr_rolling_max - group_neutral_cumsum[col]).max()\n",
31713171
" mmc_mean = per_era_mmc[col].mean()\n",
31723172
" mmc_std = per_era_mmc[col].std()\n",
3173-
" mmc_sharpe = mean / std\n",
3173+
" mmc_sharpe = mmc_mean / mmc_std\n",
31743174
" mmc_rolling_max = cumsum_mmc[col].expanding(min_periods=1).max()\n",
31753175
" mmc_max_drawdown = (rolling_max - cumsum_mmc[col]).max()\n",
31763176
" group_neutral_summary_metrics[col] = {\n",
@@ -3254,12 +3254,12 @@
32543254
"metadata": {
32553255
"id": "ds3HPim6M-s5"
32563256
},
3257-
"execution_count": 21,
3257+
"execution_count": null,
32583258
"outputs": []
32593259
},
32603260
{
32613261
"cell_type": "code",
3262-
"execution_count": 27,
3262+
"execution_count": null,
32633263
"metadata": {
32643264
"id": "PMGoxkbuyu-c"
32653265
},
@@ -3279,7 +3279,7 @@
32793279
},
32803280
{
32813281
"cell_type": "code",
3282-
"execution_count": 28,
3282+
"execution_count": null,
32833283
"metadata": {
32843284
"colab": {
32853285
"base_uri": "https://localhost:8080/",
@@ -3609,7 +3609,7 @@
36093609
},
36103610
{
36113611
"cell_type": "code",
3612-
"execution_count": 29,
3612+
"execution_count": null,
36133613
"metadata": {
36143614
"id": "g5A5r1ZFyu-c"
36153615
},
@@ -3624,7 +3624,7 @@
36243624
},
36253625
{
36263626
"cell_type": "code",
3627-
"execution_count": 30,
3627+
"execution_count": null,
36283628
"metadata": {
36293629
"colab": {
36303630
"base_uri": "https://localhost:8080/",

target_ensemble.ipynb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,7 +3029,7 @@
30293029
},
30303030
{
30313031
"cell_type": "code",
3032-
"execution_count": 31,
3032+
"execution_count": null,
30333033
"metadata": {
30343034
"colab": {
30353035
"base_uri": "https://localhost:8080/",
@@ -3871,7 +3871,7 @@
38713871
},
38723872
{
38733873
"cell_type": "code",
3874-
"execution_count": 33,
3874+
"execution_count": null,
38753875
"metadata": {
38763876
"colab": {
38773877
"base_uri": "https://localhost:8080/",
@@ -4232,7 +4232,7 @@
42324232
},
42334233
{
42344234
"cell_type": "code",
4235-
"execution_count": 34,
4235+
"execution_count": null,
42364236
"metadata": {
42374237
"colab": {
42384238
"base_uri": "https://localhost:8080/",
@@ -5249,12 +5249,14 @@
52495249
"\n",
52505250
"It's also helpful to if we measured the contribution of your models to all of Numerai's benchmark models. We call this Benchmark Model Contribution or `BMC`. On the website, `BMC` measures your model's contribution to a weighted ensemble of all of our Benchmark Models.\n",
52515251
"\n",
5252+
"This is an important metric to track because it tells you how additive your model is to Numerai's known models and, by extension, how additive you might be to the Meta Model in the future.\n",
5253+
"\n",
52525254
"To keep things simple, we will use an unweighted ensemble of Numerai's Benchmarks to measure your models' BMC, let's take a look:"
52535255
]
52545256
},
52555257
{
52565258
"cell_type": "code",
5257-
"execution_count": 35,
5259+
"execution_count": null,
52585260
"metadata": {
52595261
"colab": {
52605262
"base_uri": "https://localhost:8080/",
@@ -5623,7 +5625,7 @@
56235625
},
56245626
{
56255627
"cell_type": "code",
5626-
"execution_count": 36,
5628+
"execution_count": null,
56275629
"metadata": {
56285630
"id": "WWdOTGy4xnNq"
56295631
},
@@ -5647,7 +5649,7 @@
56475649
},
56485650
{
56495651
"cell_type": "code",
5650-
"execution_count": 37,
5652+
"execution_count": null,
56515653
"metadata": {
56525654
"colab": {
56535655
"base_uri": "https://localhost:8080/",
@@ -5977,7 +5979,7 @@
59775979
},
59785980
{
59795981
"cell_type": "code",
5980-
"execution_count": 38,
5982+
"execution_count": null,
59815983
"metadata": {
59825984
"id": "5VTrZ1Q6xnNr"
59835985
},
@@ -5992,7 +5994,7 @@
59925994
},
59935995
{
59945996
"cell_type": "code",
5995-
"execution_count": 39,
5997+
"execution_count": null,
59965998
"metadata": {
59975999
"id": "RiJjBD-zxnNr",
59986000
"colab": {

0 commit comments

Comments
 (0)