Skip to content

Commit

Permalink
Merge pull request quantopian#187 from quantopian/add-references
Browse files Browse the repository at this point in the history
MAINT: Add references
  • Loading branch information
Delaney Granizo-Mackenzie authored Nov 8, 2017
2 parents be1b0f4 + 7d8a5be commit 3c11b54
Show file tree
Hide file tree
Showing 16 changed files with 6,155 additions and 6,164 deletions.
17 changes: 14 additions & 3 deletions notebooks/lectures/Autocorrelation_and_AR_Models/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#Auto Regressive (AR) Models\n",
"# Autoregressive (AR) Models\n",
"\n",
"by Maxwell Margenot, Delaney Granizo-Mackenzie, and Lee Tobey\n",
"by Maxwell Margenot, Delaney Mackenzie, and Lee Tobey\n",
"\n",
"Lee Tobey is the founder of [Hedgewise](https://www.hedgewise.com/).\n",
"\n",
Expand All @@ -15,7 +15,9 @@
"* [www.quantopian.com/lectures](https://www.quantopian.com/lectures)\n",
"* [github.com/quantopian/research_public](https://github.com/quantopian/research_public)\n",
"\n",
"Notebook released under the Creative Commons Attribution 4.0 License."
"Notebook released under the Creative Commons Attribution 4.0 License.\n",
"\n",
"---"
]
},
{
Expand Down Expand Up @@ -785,6 +787,15 @@
"The residuals seem normally distributed. There are more model validation steps that could be done, but these are the core ones for an AR model. The next steps would be testing the model out of sample, and then using it to make predictions on your data."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References\n",
"* \"Quantitative Investment Analysis\", by DeFusco, McLeavey, Pinto, and Runkle\n",
"* \"Analysis of Financial Time Series\", by Ruey Tsay"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
65 changes: 42 additions & 23 deletions notebooks/lectures/Autocorrelation_and_AR_Models/preview.html

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions notebooks/lectures/Introduction_to_Futures/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"\n",
"Notebook released under the Creative Commons Attribution 4.0 License.\n",
"\n",
"---\n",
"\n",
"\n",
"Futures contracts are derivatives and they are fundamentally different from equities, so it is important to understand what they are and how they work. In this lecture we will detail the basic unit of a futures contract, the forward contract, specifics on the valuation of futures contracts, and some things to keep in mind when handling futures. Our goal here is to cover what makes futures tick before we get into performing any sort of statistical analysis of them."
]
Expand Down Expand Up @@ -725,6 +727,14 @@
"* http://www.investopedia.com/terms/f/futurescontract.asp"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References\n",
"* \"Options, Futures, and Other Derivatives\", by John Hull"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
54 changes: 35 additions & 19 deletions notebooks/lectures/Introduction_to_Futures/preview.html

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions notebooks/lectures/Means/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"metadata": {},
"source": [
"# Measures of Central Tendency\n",
"By Evgenia \"Jenny\" Nitishinskaya, Maxwell Margenot, and Delaney Granizo-Mackenzie.\n",
"By Evgenia \"Jenny\" Nitishinskaya, Maxwell Margenot, and Delaney Mackenzie.\n",
"\n",
"Part of the Quantopian Lecture Series:\n",
"\n",
Expand Down Expand Up @@ -357,6 +357,14 @@
"Even when you are using the right metrics for mean and spread, they can make no sense if your underlying distribution is not what you think it is. For instance, using standard deviation to measure frequency of an event will usually assume normality. Try not to assume distributions unless you have to, in which case you should rigourously check that the data do fit the distribution you are assuming."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References\n",
"* \"Quantitative Investment Analysis\", by DeFusco, McLeavey, Pinto, and Runkle"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -381,7 +389,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
"version": "2.7.12"
}
},
"nbformat": 4,
Expand Down
29 changes: 20 additions & 9 deletions notebooks/lectures/Means/preview.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<head>
<meta charset="utf-8" />
<title>Cloned from "Quantopian Lecture Series: Means"</title>
<title>Cloned from "Means"</title>

<style type="text/css">
/*!
Expand Down Expand Up @@ -11767,7 +11767,7 @@
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Measures-of-Central-Tendency">Measures of Central Tendency<a class="anchor-link" href="#Measures-of-Central-Tendency">&#194;&#182;</a></h1><p>By Evgenia "Jenny" Nitishinskaya, Maxwell Margenot, and Delaney Granizo-Mackenzie.</p>
<h1 id="Measures-of-Central-Tendency">Measures of Central Tendency<a class="anchor-link" href="#Measures-of-Central-Tendency">&#182;</a></h1><p>By Evgenia "Jenny" Nitishinskaya, Maxwell Margenot, and Delaney Mackenzie.</p>
<p>Part of the Quantopian Lecture Series:</p>
<ul>
<li><a href="https://www.quantopian.com/lectures">www.quantopian.com/lectures</a></li>
Expand All @@ -11776,7 +11776,7 @@ <h1 id="Measures-of-Central-Tendency">Measures of Central Tendency<a class="anch
<p>Notebook released under the Creative Commons Attribution 4.0 License.</p>
<hr>
<p>In this notebook we will discuss ways to summarize a set of data using a single number. The goal is to capture information about the distribution of data.</p>
<h1 id="Arithmetic-mean">Arithmetic mean<a class="anchor-link" href="#Arithmetic-mean">&#194;&#182;</a></h1><p>The arithmetic mean is used very frequently to summarize numerical data, and is usually the one assumed to be meant by the word "average." It is defined as the sum of the observations divided by the number of observations:
<h1 id="Arithmetic-mean">Arithmetic mean<a class="anchor-link" href="#Arithmetic-mean">&#182;</a></h1><p>The arithmetic mean is used very frequently to summarize numerical data, and is usually the one assumed to be meant by the word "average." It is defined as the sum of the observations divided by the number of observations:
$$\mu = \frac{\sum_{i=1}^N X_i}{N}$$</p>
<p>where $X_1, X_2, \ldots , X_N$ are our observations.</p>

Expand Down Expand Up @@ -11840,7 +11840,7 @@ <h1 id="Arithmetic-mean">Arithmetic mean<a class="anchor-link" href="#Arithmetic
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Median">Median<a class="anchor-link" href="#Median">&#194;&#182;</a></h1><p>The median of a set of data is the number which appears in the middle of the list when it is sorted in increasing or decreasing order. When we have an odd number $n$ of data points, this is simply the value in position $(n+1)/2$. When we have an even number of data points, the list splits in half and there is no item in the middle; so we define the median as the average of the values in positions $n/2$ and $(n+2)/2$.</p>
<h1 id="Median">Median<a class="anchor-link" href="#Median">&#182;</a></h1><p>The median of a set of data is the number which appears in the middle of the list when it is sorted in increasing or decreasing order. When we have an odd number $n$ of data points, this is simply the value in position $(n+1)/2$. When we have an even number of data points, the list splits in half and there is no item in the middle; so we define the median as the average of the values in positions $n/2$ and $(n+2)/2$.</p>
<p>The median is less affected by extreme values in the data than the arithmetic mean. It tells us the value that splits the data set in half, but not how much smaller or larger the other values are.</p>

</div>
Expand Down Expand Up @@ -11883,7 +11883,7 @@ <h1 id="Median">Median<a class="anchor-link" href="#Median">&#194;&#182;</a></h1
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Mode">Mode<a class="anchor-link" href="#Mode">&#194;&#182;</a></h1><p>The mode is the most frequently occuring value in a data set. It can be applied to non-numerical data, unlike the mean and the median. One situation in which it is useful is for data whose possible values are independent. For example, in the outcomes of a weighted die, coming up 6 often does not mean it is likely to come up 5; so knowing that the data set has a mode of 6 is more useful than knowing it has a mean of 4.5.</p>
<h1 id="Mode">Mode<a class="anchor-link" href="#Mode">&#182;</a></h1><p>The mode is the most frequently occuring value in a data set. It can be applied to non-numerical data, unlike the mean and the median. One situation in which it is useful is for data whose possible values are independent. For example, in the outcomes of a weighted die, coming up 6 often does not mean it is likely to come up 5; so knowing that the data set has a mode of 6 is more useful than knowing it has a mean of 4.5.</p>

</div>
</div>
Expand Down Expand Up @@ -12005,7 +12005,7 @@ <h1 id="Mode">Mode<a class="anchor-link" href="#Mode">&#194;&#182;</a></h1><p>Th
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Geometric-mean">Geometric mean<a class="anchor-link" href="#Geometric-mean">&#194;&#182;</a></h1><p>While the arithmetic mean averages using addition, the geometric mean uses multiplication:
<h1 id="Geometric-mean">Geometric mean<a class="anchor-link" href="#Geometric-mean">&#182;</a></h1><p>While the arithmetic mean averages using addition, the geometric mean uses multiplication:
$$ G = \sqrt[n]{X_1X_1\ldots X_n} $$</p>
<p>for observations $X_i \geq 0$. We can also rewrite it as an arithmetic mean using logarithms:
$$ \ln G = \frac{\sum_{i=1}^n \ln X_i}{n} $$</p>
Expand Down Expand Up @@ -12143,7 +12143,7 @@ <h1 id="Geometric-mean">Geometric mean<a class="anchor-link" href="#Geometric-me
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Harmonic-mean">Harmonic mean<a class="anchor-link" href="#Harmonic-mean">&#194;&#182;</a></h1><p>The harmonic mean is less commonly used than the other types of means. It is defined as
<h1 id="Harmonic-mean">Harmonic mean<a class="anchor-link" href="#Harmonic-mean">&#182;</a></h1><p>The harmonic mean is less commonly used than the other types of means. It is defined as
$$ H = \frac{n}{\sum_{i=1}^n \frac{1}{X_i}} $$</p>
<p>As with the geometric mean, we can rewrite the harmonic mean to look like an arithmetic mean. The reciprocal of the harmonic mean is the arithmetic mean of the reciprocals of the observations:
$$ \frac{1}{H} = \frac{\sum_{i=1}^n \frac{1}{X_i}}{n} $$</p>
Expand Down Expand Up @@ -12198,8 +12198,19 @@ <h1 id="Harmonic-mean">Harmonic mean<a class="anchor-link" href="#Harmonic-mean"
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Point-Estimates-Can-Be-Deceiving">Point Estimates Can Be Deceiving<a class="anchor-link" href="#Point-Estimates-Can-Be-Deceiving">&#194;&#182;</a></h1><p>Means by nature hide a lot of information, as they collapse entire distributions into one number. As a result often 'point estimates' or metrics that use one number, can disguise large programs in your data. You should be careful to ensure that you are not losing key information by summarizing your data, and you should rarely, if ever, use a mean without also referring to a measure of spread.</p>
<h2 id="Underlying-Distribution-Can-be-Wrong">Underlying Distribution Can be Wrong<a class="anchor-link" href="#Underlying-Distribution-Can-be-Wrong">&#194;&#182;</a></h2><p>Even when you are using the right metrics for mean and spread, they can make no sense if your underlying distribution is not what you think it is. For instance, using standard deviation to measure frequency of an event will usually assume normality. Try not to assume distributions unless you have to, in which case you should rigourously check that the data do fit the distribution you are assuming.</p>
<h1 id="Point-Estimates-Can-Be-Deceiving">Point Estimates Can Be Deceiving<a class="anchor-link" href="#Point-Estimates-Can-Be-Deceiving">&#182;</a></h1><p>Means by nature hide a lot of information, as they collapse entire distributions into one number. As a result often 'point estimates' or metrics that use one number, can disguise large programs in your data. You should be careful to ensure that you are not losing key information by summarizing your data, and you should rarely, if ever, use a mean without also referring to a measure of spread.</p>
<h2 id="Underlying-Distribution-Can-be-Wrong">Underlying Distribution Can be Wrong<a class="anchor-link" href="#Underlying-Distribution-Can-be-Wrong">&#182;</a></h2><p>Even when you are using the right metrics for mean and spread, they can make no sense if your underlying distribution is not what you think it is. For instance, using standard deviation to measure frequency of an event will usually assume normality. Try not to assume distributions unless you have to, in which case you should rigourously check that the data do fit the distribution you are assuming.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="References">References<a class="anchor-link" href="#References">&#182;</a></h2><ul>
<li>"Quantitative Investment Analysis", by DeFusco, McLeavey, Pinto, and Runkle</li>
</ul>

</div>
</div>
Expand Down
14 changes: 11 additions & 3 deletions notebooks/lectures/Model_Misspecification/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Model specification\n",
"By Evgenia \"Jenny\" Nitishinskaya and Delaney Granizo-Mackenzie\n",
"# Model Misspecification\n",
"By Evgenia \"Jenny\" Nitishinskaya and Delaney Mackenzie\n",
"\n",
"Part of the Quantopian Lecture Series:\n",
"\n",
Expand Down Expand Up @@ -646,6 +646,14 @@
"Therefore we cannot reject the hypothesis that `yw` has a unit root (as we know it does, by construction). If we know that a time series has a unit root and we would like to analyze it anyway, we can model instead the first differenced series $y_t = x_t - x_{t-1}$ if that is stationary, and use it to predict future values of $x$. We can also use regression if both the dependent and independent variables are time series with unit roots and the two are cointegrated."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References\n",
"* \"Quantitative Investment Analysis\", by DeFusco, McLeavey, Pinto, and Runkle"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -670,7 +678,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
"version": "2.7.12"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 3c11b54

Please sign in to comment.