From b9dfda01d21d0b74362dbd7f7ea12aec54f35c01 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Mon, 12 Aug 2013 16:05:48 -0400 Subject: [PATCH] DOC: Add annotations file for answer key. Currently, just provide a way to render to some of the data extracted. Intended to have more thorough documentation of the spreadsheet, explaining derivation/calculations in each sheet and column. --- tests/risk/AnswerKeyAnnotations.ipynb | 87 +++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 tests/risk/AnswerKeyAnnotations.ipynb diff --git a/tests/risk/AnswerKeyAnnotations.ipynb b/tests/risk/AnswerKeyAnnotations.ipynb new file mode 100644 index 00000000..8343d7ec --- /dev/null +++ b/tests/risk/AnswerKeyAnnotations.ipynb @@ -0,0 +1,87 @@ +{ + "metadata": { + "name": "AnswerKeyAnnotations" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#\n", + "# Copyright 2013 Quantopian, Inc.\n", + "#\n", + "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", + "# you may not use this file except in compliance with the License.\n", + "# You may obtain a copy of the License at\n", + "#\n", + "# http://www.apache.org/licenses/LICENSE-2.0\n", + "#\n", + "# Unless required by applicable law or agreed to in writing, software\n", + "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", + "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", + "# See the License for the specific language governing permissions and\n", + "# limitations under the License." + ], + "language": "python", + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%load_ext autoreload\n", + "%autoreload 2" + ], + "language": "python", + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import datetime\n", + "import pandas as pd\n", + "from IPython.display import HTML\n", + "\n", + "import answer_key\n", + "ANSWER_KEY = answer_key.ANSWER_KEY" + ], + "language": "python", + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print 'Period Returns Index'\n", + "print ANSWER_KEY.RETURNS" + ], + "language": "python", + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "HTML(answer_key.RETURNS_DATA.to_html())" + ], + "language": "python", + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ANSWER_KEY.ALGORITHM_CUMULATIVE_SHARPE" + ], + "language": "python", + "outputs": [] + } + ] + } + ] +} \ No newline at end of file