Skip to content

Commit 8f0a969

Browse files
authored
Merge pull request #411 from quantopian/fix_nbs
Fix example notebooks
2 parents 774174e + eb9444d commit 8f0a969

14 files changed

+4228
-1692
lines changed

pyfolio/examples/Fama-French Benchmark.ipynb

Lines changed: 0 additions & 209 deletions
This file was deleted.

pyfolio/examples/bayesian.ipynb

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Bayesian performance analysis example in pyfolio"
8-
]
9-
},
10-
{
11-
"cell_type": "markdown",
12-
"metadata": {},
13-
"source": [
14-
"There are also a few more advanced (and still experimental) analysis methods in pyfolio based on Bayesian statistics. \n",
7+
"# Bayesian performance analysis example in pyfolio\n",
8+
"\n",
9+
"There are a few advanced analysis methods in pyfolio based on Bayesian statistics. \n",
1510
"\n",
16-
"The main benefit of these methods is **uncertainty quantification**. All the values you saw above, like the Sharpe ratio, are just single numbers. These estimates are noisy because they have been computed over a limited number of data points. So how much can you trust these numbers? You don't know because there is no sense of uncertainty. That is where Bayesian statistics helps as instead of single values, we are dealing with probability distributions that assign degrees of belief to all possible parameter values.\n",
11+
"The main benefit of these methods is **uncertainty quantification**. All the traditional measures of performance, like the Sharpe ratio, are just single numbers. These estimates are noisy because they have been computed over a limited number of data points. So how much can you trust these numbers? You don't know because there is no sense of uncertainty. That is where Bayesian statistics helps as instead of single values, we are dealing with probability distributions that assign degrees of belief to all possible parameter values.\n",
1712
"\n",
18-
"Lets create the Bayesian tear sheet. Under the hood this is running MCMC sampling in [`PyMC3`](http://pymc-devs.github.io/pymc3/) to estimate the posteriors which can take quite a while (that's the reason why we don't generate this by default in `create_full_tear_sheet()`)."
13+
"Lets create the Bayesian tear sheet. Under the hood this is running MCMC sampling in [PyMC3](http://pymc-devs.github.io/pymc3/) to estimate the posteriors which can take quite a while (that's the reason why we don't generate this by default in `create_full_tear_sheet`)."
1914
]
2015
},
2116
{
@@ -181,7 +176,7 @@
181176
"source": [
182177
"## Running models directly\n",
183178
"\n",
184-
"You can also run individual models. All models can be found in `pyfolio.bayesian` and run via the `run_model()` function."
179+
"You can also run individual models. All models can be found in `pyfolio.bayesian` and run via the `run_model` function."
185180
]
186181
},
187182
{
@@ -335,27 +330,27 @@
335330
"* [A blog post about the Bayesian models with Sepideh Sadeghi](http://blog.quantopian.com/bayesian-cone/)\n",
336331
"* [My personal blog on Bayesian modeling](http://twiecki.github.io/)\n",
337332
"* A talk I gave in Singapore on [Probabilistic Programming in Quantitative Finance]( http://blog.quantopian.com/probabilistic-programming-for-non-statisticians/)\n",
338-
"* The IPython NB book [Bayesian Methods for Hackers](https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers)."
333+
"* A series of IPython notebooks on [Bayesian Methods for Hackers](https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers)."
339334
]
340335
}
341336
],
342337
"metadata": {
343338
"kernelspec": {
344-
"display_name": "Python 3",
339+
"display_name": "Python 2",
345340
"language": "python",
346-
"name": "python3"
341+
"name": "python2"
347342
},
348343
"language_info": {
349344
"codemirror_mode": {
350345
"name": "ipython",
351-
"version": 3
346+
"version": 2
352347
},
353348
"file_extension": ".py",
354349
"mimetype": "text/x-python",
355350
"name": "python",
356351
"nbconvert_exporter": "python",
357-
"pygments_lexer": "ipython3",
358-
"version": "3.5.1"
352+
"pygments_lexer": "ipython2",
353+
"version": "2.7.13"
359354
}
360355
},
361356
"nbformat": 4,
-59.8 KB
Binary file not shown.

pyfolio/examples/fama_french_benchmark.ipynb

Lines changed: 318 additions & 0 deletions
Large diffs are not rendered by default.

pyfolio/examples/quantopian_example.ipynb renamed to pyfolio/examples/full_tear_sheet_example.ipynb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Full Tear Sheet Example\n",
8+
"\n",
9+
"_**Note:**_ Please run this notebook in [Quantopian Research](https://www.quantopian.com/notebooks)"
10+
]
11+
},
312
{
413
"cell_type": "code",
514
"execution_count": 1,
@@ -169,9 +178,9 @@
169178
"name": "python",
170179
"nbconvert_exporter": "python",
171180
"pygments_lexer": "ipython2",
172-
"version": "2.7.10"
181+
"version": "2.7.13"
173182
}
174183
},
175184
"nbformat": 4,
176185
"nbformat_minor": 0
177-
}
186+
}

pyfolio/examples/linear algebra tests.ipynb

Lines changed: 0 additions & 195 deletions
This file was deleted.

0 commit comments

Comments
 (0)