diff options
Diffstat (limited to 'python/notebooks')
| -rw-r--r-- | python/notebooks/Valuation Backtest.ipynb | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/python/notebooks/Valuation Backtest.ipynb b/python/notebooks/Valuation Backtest.ipynb index 77f709b8..ca6ae02d 100644 --- a/python/notebooks/Valuation Backtest.ipynb +++ b/python/notebooks/Valuation Backtest.ipynb @@ -44,7 +44,7 @@ "outputs": [], "source": [ "#%matplotlib nbagg\n", - "%matplotlib inline\n", + "#%matplotlib inline\n", "mark.pretty_plot(df_long)\n", "#file saved in serenitas shared drive/edwin/" ] @@ -188,6 +188,7 @@ "metadata": {}, "outputs": [], "source": [ + "#Annual Return using different methodology\n", "round(mark.annual_performance(results[1])*100,2)" ] }, @@ -197,6 +198,16 @@ "metadata": {}, "outputs": [], "source": [ + "#Return using different methodology - Same calulation as above but monthly \n", + "(results[1]/results[1].shift(1) - 1)[-24:][['mark_manager', 'mark_closest_all', 'mark_filtered_mean']]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "#A positive impact % means the alternative methodology results in a higher NAV than the fund's valuation policy.\n", "round(pd.DataFrame(mark.alt_nav_impact())*100,2)" ] @@ -229,6 +240,16 @@ "metadata": {}, "outputs": [], "source": [ + "summary.iloc[-2]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Trade winners/performance\n", "df = ops.trade_performance()\n", "df = df.set_index('trade_date')\n", "df.days_held = df.days_held.dt.days\n", @@ -260,7 +281,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.0" } }, "nbformat": 4, |
