diff options
Diffstat (limited to 'python/notebooks')
| -rw-r--r-- | python/notebooks/Curve Trades.ipynb | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/python/notebooks/Curve Trades.ipynb b/python/notebooks/Curve Trades.ipynb index 6042ccc6..7f120638 100644 --- a/python/notebooks/Curve Trades.ipynb +++ b/python/notebooks/Curve Trades.ipynb @@ -125,7 +125,8 @@ "metadata": {}, "outputs": [], "source": [ - "model = ct.curve_model()" + "model = ct.curve_model()\n", + "model_results = ct.curve_model_results(model[0], model[1])" ] }, { @@ -134,9 +135,7 @@ "metadata": {}, "outputs": [], "source": [ - "ax = model[['ratio','predicted']].plot()\n", - "ax.plot(model.index, model.up_2_stdev, 'r--')\n", - "ax.plot(model.index, model.down_2_stdev, 'b--')" + "model[1].summary()" ] }, { @@ -145,7 +144,41 @@ "metadata": {}, "outputs": [], "source": [ - "model.iloc[-1]" + "import numpy as np\n", + "ax = model_results[['ratio','predicted']].plot()\n", + "ax.plot(model_results.index, model_results.up_2_stdev, 'r--')\n", + "ax.plot(model_results.index, model_results.down_2_stdev, 'b--')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "model_results.iloc[-1]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Var on current position\n", + "results = ct.curve_var()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "results\n", + "#first number: at 5% flatness\n", + "#second number: at predicted curve shape\n", + "#third number: at 5% flatness given duration and spread" ] }, { |
