HSG-MCS-HS21_Julia/Problemsets/Solutions/PS10_DataFrames_Solution.ipynb

560 lines
81 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Load Packages"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"printyellow (generic function with 1 method)"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"using Printf, Dates, Statistics, CSV, DataFrames\n",
"include(\"jlFiles/printmat.jl\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Loading Some Data with CSV.jl"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The first 4 lines of Data/Options_prices_US_Canada.csv:\n",
"\n",
"symbol,exchange,date,adjusted close,option symbol,expiration,strike,call/put,style,ask,bid,volume,open interest,unadjusted\n",
"SPX,CBOE,03/30/17,2368.06,SPXW 170331C00300000,03/31/17,300,C,E,2073.9,2062.9,0,0,2368.927\n",
"SPX,CBOE,03/30/17,2368.06,SPXW 170331P00300000,03/31/17,300,P,E,0.1,0,0,0,2368.927\n",
"SPX,CBOE,03/30/17,2368.06,SPXW 170331C00400000,03/31/17,400,C,E,1974.1,1962.7,0,0,2368.927\n",
"\n"
]
}
],
"source": [
"DataFile = \"Data/Options_prices_US_Canada.csv\"\n",
"\n",
"println(\"The first 4 lines of $(DataFile):\\n\")\n",
"txt = readlines(DataFile)\n",
"printmat(txt[1:4])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Use `normalizenames` to get names that can be used in Julia as variables names and specify the `dateformat` used in the csv file (to convert to proper Julia dates). The dates in the file are given as `03/30/17` which CSV/DataFrames interpret as 30 March year 17 (AD). We add `Dates.Year(2000)` to get year 2017."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m13952×10 DataFrame\u001b[0m\n",
"\u001b[1m Row \u001b[0m│\u001b[1m symbol \u001b[0m\u001b[1m date \u001b[0m\u001b[1m close \u001b[0m\u001b[1m expiration \u001b[0m\u001b[1m strike \u001b[0m\u001b[1m call_put \u001b[0m\u001b[1m ask \u001b[0m\u001b[1m\u001b[0m ⋯\n",
"\u001b[1m \u001b[0m│\u001b[90m String3 \u001b[0m\u001b[90m Date \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m Date \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m String1 \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m\u001b[0m ⋯\n",
"───────┼────────────────────────────────────────────────────────────────────────\n",
" 1 │ SPX 2017-03-30 2368.06 2017-03-31 300.0 C 2073.9 ⋯\n",
" 2 │ SPX 2017-03-30 2368.06 2017-03-31 300.0 P 0.1\n",
" 3 │ SPX 2017-03-30 2368.06 2017-03-31 400.0 C 1974.1\n",
" 4 │ SPX 2017-03-30 2368.06 2017-03-31 400.0 P 0.05\n",
" 5 │ SPX 2017-03-30 2368.06 2017-03-31 500.0 C 1874.1 ⋯\n",
" 6 │ SPX 2017-03-30 2368.06 2017-03-31 500.0 P 0.05\n",
" 7 │ SPX 2017-03-30 2368.06 2017-03-31 600.0 C 1774.1\n",
" 8 │ SPX 2017-03-30 2368.06 2017-03-31 600.0 P 0.05\n",
" 9 │ SPX 2017-03-30 2368.06 2017-03-31 700.0 C 1673.9 ⋯\n",
" 10 │ SPX 2017-03-30 2368.06 2017-03-31 700.0 P 0.05\n",
" 11 │ SPX 2017-03-30 2368.06 2017-03-31 750.0 C 1624.1\n",
" ⋮ │ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋱\n",
" 13943 │ XIU 2017-03-30 23.06 2019-03-15 21.0 C 3.21\n",
" 13944 │ XIU 2017-03-30 23.06 2019-03-15 21.0 P 1.71 ⋯\n",
" 13945 │ XIU 2017-03-30 23.06 2019-03-15 22.0 C 2.53\n",
" 13946 │ XIU 2017-03-30 23.06 2019-03-15 22.0 P 2.03\n",
" 13947 │ XIU 2017-03-30 23.06 2019-03-15 23.0 C 1.97\n",
" 13948 │ XIU 2017-03-30 23.06 2019-03-15 23.0 P 2.51 ⋯\n",
" 13949 │ XIU 2017-03-30 23.06 2019-03-15 24.0 C 1.5\n",
" 13950 │ XIU 2017-03-30 23.06 2019-03-15 24.0 P 3.12\n",
" 13951 │ XIU 2017-03-30 23.06 2019-03-15 25.0 C 1.13\n",
" 13952 │ XIU 2017-03-30 23.06 2019-03-15 25.0 P 3.64 ⋯\n",
"\u001b[36m 3 columns and 13931 rows omitted\u001b[0m"
]
}
],
"source": [
"df1 = CSV.read(DataFile,DataFrame,normalizenames=true,dateformat=\"mm/dd/yy\")\n",
"\n",
"df1.date .+= Dates.Year(2000) #03/30/17 to 03/30/2017\n",
"df1.expiration .+= Dates.Year(2000)\n",
"\n",
"select!(df1,Not([:exchange,:option_symbol,:style,:unadjusted])) #deleting some columns\n",
"rename!(df1,:adjusted_close => :close) #renaming a column\n",
"\n",
"show(df1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Task 1\n",
"\n",
"Create a new DataFrame that contains only the data for SPX and those option contracts that were traded (volume > 0). Hint: `df1[vv, :]` picks out the rows of the data frame for which `vv` is `true`. "
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m2359×10 DataFrame\u001b[0m\n",
"\u001b[1m Row \u001b[0m│\u001b[1m symbol \u001b[0m\u001b[1m date \u001b[0m\u001b[1m close \u001b[0m\u001b[1m expiration \u001b[0m\u001b[1m strike \u001b[0m\u001b[1m call_put \u001b[0m\u001b[1m ask \u001b[0m\u001b[1m \u001b[0m ⋯\n",
"\u001b[1m \u001b[0m│\u001b[90m String3 \u001b[0m\u001b[90m Date \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m Date \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m String1 \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m \u001b[0m ⋯\n",
"──────┼─────────────────────────────────────────────────────────────────────────\n",
" 1 │ SPX 2017-03-30 2368.06 2017-03-31 1600.0 C 774.0 ⋯\n",
" 2 │ SPX 2017-03-30 2368.06 2017-03-31 1600.0 P 0.05\n",
" 3 │ SPX 2017-03-30 2368.06 2017-03-31 2040.0 P 0.05\n",
" 4 │ SPX 2017-03-30 2368.06 2017-03-31 2050.0 P 0.05\n",
" 5 │ SPX 2017-03-30 2368.06 2017-03-31 2100.0 P 0.05 ⋯\n",
" 6 │ SPX 2017-03-30 2368.06 2017-03-31 2110.0 C 264.5\n",
" 7 │ SPX 2017-03-30 2368.06 2017-03-31 2120.0 P 0.05\n",
" 8 │ SPX 2017-03-30 2368.06 2017-03-31 2150.0 P 0.05\n",
" 9 │ SPX 2017-03-30 2368.06 2017-03-31 2175.0 C 199.5 ⋯\n",
" 10 │ SPX 2017-03-30 2368.06 2017-03-31 2175.0 P 0.05\n",
" 11 │ SPX 2017-03-30 2368.06 2017-03-31 2180.0 C 194.5\n",
" ⋮ │ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋱\n",
" 2350 │ SPX 2017-03-30 2368.06 2019-12-20 1900.0 P 111.4\n",
" 2351 │ SPX 2017-03-30 2368.06 2019-12-20 2000.0 P 136.0 ⋯\n",
" 2352 │ SPX 2017-03-30 2368.06 2019-12-20 2200.0 C 345.7\n",
" 2353 │ SPX 2017-03-30 2368.06 2019-12-20 2300.0 C 287.0\n",
" 2354 │ SPX 2017-03-30 2368.06 2019-12-20 2350.0 C 259.7\n",
" 2355 │ SPX 2017-03-30 2368.06 2019-12-20 2375.0 P 264.3 ⋯\n",
" 2356 │ SPX 2017-03-30 2368.06 2019-12-20 2400.0 C 230.7\n",
" 2357 │ SPX 2017-03-30 2368.06 2019-12-20 2400.0 P 275.3\n",
" 2358 │ SPX 2017-03-30 2368.06 2019-12-20 2800.0 C 74.9\n",
" 2359 │ SPX 2017-03-30 2368.06 2019-12-20 3000.0 C 37.5 ⋯\n",
"\u001b[36m 3 columns and 2338 rows omitted\u001b[0m"
]
}
],
"source": [
"vv = (df1.symbol .== \"SPX\") .& (df1.volume .> 0) #rows with SPX, and trade\n",
"\n",
"df2 = df1[vv, :] #create new df, only some rows\n",
"\n",
"show(df2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Task 2\n",
"\n",
"Create a *group* for each expiration date. These groups can be referred to as `dataG2[key]`.\n",
"\n",
"Hints: `groupby()`"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"dataG2 = groupby(df2,:expiration); #grouped by expiration date"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Task 3\n",
"\n",
"Print the number of contracts (`nrow`) and the sum of the open interest `:open_interest=>sum` for each of the expiration dates.\n",
"\n",
"Hint: `combine()`"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div class=\"data-frame\"><p>34 rows × 3 columns</p><table class=\"data-frame\"><thead><tr><th></th><th>expiration</th><th>nrow</th><th>open_interest_sum</th></tr><tr><th></th><th title=\"Date\">Date</th><th title=\"Int64\">Int64</th><th title=\"Int64\">Int64</th></tr></thead><tbody><tr><th>1</th><td>2017-03-31</td><td>100</td><td>1010183</td></tr><tr><th>2</th><td>2017-04-03</td><td>94</td><td>109345</td></tr><tr><th>3</th><td>2017-04-05</td><td>84</td><td>102022</td></tr><tr><th>4</th><td>2017-04-07</td><td>140</td><td>467105</td></tr><tr><th>5</th><td>2017-04-10</td><td>73</td><td>51755</td></tr><tr><th>6</th><td>2017-04-12</td><td>67</td><td>56228</td></tr><tr><th>7</th><td>2017-04-13</td><td>109</td><td>303944</td></tr><tr><th>8</th><td>2017-04-17</td><td>70</td><td>40855</td></tr><tr><th>9</th><td>2017-04-19</td><td>57</td><td>25690</td></tr><tr><th>10</th><td>2017-04-21</td><td>166</td><td>1775684</td></tr><tr><th>11</th><td>2017-04-24</td><td>69</td><td>15085</td></tr><tr><th>12</th><td>2017-04-26</td><td>56</td><td>6560</td></tr><tr><th>13</th><td>2017-04-28</td><td>124</td><td>467161</td></tr><tr><th>14</th><td>2017-05-05</td><td>129</td><td>169530</td></tr><tr><th>15</th><td>2017-05-12</td><td>121</td><td>225600</td></tr><tr><th>16</th><td>2017-05-19</td><td>158</td><td>937452</td></tr><tr><th>17</th><td>2017-05-26</td><td>95</td><td>12914</td></tr><tr><th>18</th><td>2017-05-31</td><td>105</td><td>120944</td></tr><tr><th>19</th><td>2017-06-02</td><td>34</td><td>0</td></tr><tr><th>20</th><td>2017-06-16</td><td>126</td><td>1956193</td></tr><tr><th>21</th><td>2017-06-30</td><td>72</td><td>136661</td></tr><tr><th>22</th><td>2017-07-21</td><td>39</td><td>51058</td></tr><tr><th>23</th><td>2017-07-31</td><td>27</td><td>56511</td></tr><tr><th>24</th><td>2017-08-31</td><td>14</td><td>15578</td></tr><tr><th>25</th><td>2017-09-15</td><td>45</td><td>524556</td></tr><tr><th>26</th><td>2017-09-29</td><td>17</td><td>45842</td></tr><tr><th>27</th><td>2017-12-15</td><td>46</td><td>759858</td></tr><tr><th>28</th><td>2017-12-29</td><td>22</td><td>35398</td></tr><tr><th>29</th><td>2018-01-19</td><td>18</td><td>78967</td></tr><tr><th>30</th><td>2018-03-16</td><td>16</td><td>15051</td></tr><tr><th>&vellip;</th><td>&vellip;</td><td>&vellip;</td><td>&vellip;</td></tr></tbody></table></div>"
],
"text/latex": [
"\\begin{tabular}{r|ccc}\n",
"\t& expiration & nrow & open\\_interest\\_sum\\\\\n",
"\t\\hline\n",
"\t& Date & Int64 & Int64\\\\\n",
"\t\\hline\n",
"\t1 & 2017-03-31 & 100 & 1010183 \\\\\n",
"\t2 & 2017-04-03 & 94 & 109345 \\\\\n",
"\t3 & 2017-04-05 & 84 & 102022 \\\\\n",
"\t4 & 2017-04-07 & 140 & 467105 \\\\\n",
"\t5 & 2017-04-10 & 73 & 51755 \\\\\n",
"\t6 & 2017-04-12 & 67 & 56228 \\\\\n",
"\t7 & 2017-04-13 & 109 & 303944 \\\\\n",
"\t8 & 2017-04-17 & 70 & 40855 \\\\\n",
"\t9 & 2017-04-19 & 57 & 25690 \\\\\n",
"\t10 & 2017-04-21 & 166 & 1775684 \\\\\n",
"\t11 & 2017-04-24 & 69 & 15085 \\\\\n",
"\t12 & 2017-04-26 & 56 & 6560 \\\\\n",
"\t13 & 2017-04-28 & 124 & 467161 \\\\\n",
"\t14 & 2017-05-05 & 129 & 169530 \\\\\n",
"\t15 & 2017-05-12 & 121 & 225600 \\\\\n",
"\t16 & 2017-05-19 & 158 & 937452 \\\\\n",
"\t17 & 2017-05-26 & 95 & 12914 \\\\\n",
"\t18 & 2017-05-31 & 105 & 120944 \\\\\n",
"\t19 & 2017-06-02 & 34 & 0 \\\\\n",
"\t20 & 2017-06-16 & 126 & 1956193 \\\\\n",
"\t21 & 2017-06-30 & 72 & 136661 \\\\\n",
"\t22 & 2017-07-21 & 39 & 51058 \\\\\n",
"\t23 & 2017-07-31 & 27 & 56511 \\\\\n",
"\t24 & 2017-08-31 & 14 & 15578 \\\\\n",
"\t25 & 2017-09-15 & 45 & 524556 \\\\\n",
"\t26 & 2017-09-29 & 17 & 45842 \\\\\n",
"\t27 & 2017-12-15 & 46 & 759858 \\\\\n",
"\t28 & 2017-12-29 & 22 & 35398 \\\\\n",
"\t29 & 2018-01-19 & 18 & 78967 \\\\\n",
"\t30 & 2018-03-16 & 16 & 15051 \\\\\n",
"\t$\\dots$ & $\\dots$ & $\\dots$ & $\\dots$ \\\\\n",
"\\end{tabular}\n"
],
"text/plain": [
"\u001b[1m34×3 DataFrame\u001b[0m\n",
"\u001b[1m Row \u001b[0m│\u001b[1m expiration \u001b[0m\u001b[1m nrow \u001b[0m\u001b[1m open_interest_sum \u001b[0m\n",
"\u001b[1m \u001b[0m│\u001b[90m Date \u001b[0m\u001b[90m Int64 \u001b[0m\u001b[90m Int64 \u001b[0m\n",
"─────┼──────────────────────────────────────\n",
" 1 │ 2017-03-31 100 1010183\n",
" 2 │ 2017-04-03 94 109345\n",
" 3 │ 2017-04-05 84 102022\n",
" 4 │ 2017-04-07 140 467105\n",
" 5 │ 2017-04-10 73 51755\n",
" 6 │ 2017-04-12 67 56228\n",
" 7 │ 2017-04-13 109 303944\n",
" 8 │ 2017-04-17 70 40855\n",
" 9 │ 2017-04-19 57 25690\n",
" 10 │ 2017-04-21 166 1775684\n",
" 11 │ 2017-04-24 69 15085\n",
" ⋮ │ ⋮ ⋮ ⋮\n",
" 25 │ 2017-09-15 45 524556\n",
" 26 │ 2017-09-29 17 45842\n",
" 27 │ 2017-12-15 46 759858\n",
" 28 │ 2017-12-29 22 35398\n",
" 29 │ 2018-01-19 18 78967\n",
" 30 │ 2018-03-16 16 15051\n",
" 31 │ 2018-03-29 9 153\n",
" 32 │ 2018-06-15 17 69132\n",
" 33 │ 2018-12-21 27 179774\n",
" 34 │ 2019-12-20 13 9213\n",
"\u001b[36m 13 rows omitted\u001b[0m"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"combine(dataG2,nrow,:open_interest=>sum) #same information as above, uncomment to se"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Task 4 \n",
"Creating two new DataFrames: for expiration date 2017-04-21 and another for 2017-06-16.\n",
"\n",
"Hint: `dataG2[(expiration = Date(\"2017-04-21\"),)]`"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
}
],
"source": [
"#creating two new DataFrames: for two different expiration days\n",
"\n",
"df_20170421 = dataG2[(expiration = Date(\"2017-04-21\"),)]\n",
"df_20170616 = dataG2[(expiration = Date(\"2017-06-16\"),)]\n",
"\n",
"println()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Task 5\n",
"\n",
"For the expiration date 2017-04-21, calculate the mid price as the average of the `.ask` and `.bid`. \n",
"\n",
"Plot the mid price as a function of the strike price `.strike` for put options. Add a curve another curve for the call options."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"using Plots #this loads the Plots package\n",
"\n",
"#pyplot(size=(600,400)) #choice of plotting backend\n",
"gr(size=(480,320))\n",
"default(fmt = :svg) "
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"480\" height=\"320\" viewBox=\"0 0 1920 1280\">\n",
"<defs>\n",
" <clipPath id=\"clip910\">\n",
" <rect x=\"0\" y=\"0\" width=\"1920\" height=\"1280\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<path clip-path=\"url(#clip910)\" d=\"\n",
"M0 1280 L1920 1280 L1920 0 L0 0 Z\n",
" \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n",
"<defs>\n",
" <clipPath id=\"clip911\">\n",
" <rect x=\"384\" y=\"0\" width=\"1345\" height=\"1280\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<path clip-path=\"url(#clip910)\" d=\"\n",
"M167.215 1106.38 L1872.76 1106.38 L1872.76 123.472 L167.215 123.472 Z\n",
" \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n",
"<defs>\n",
" <clipPath id=\"clip912\">\n",
" <rect x=\"167\" y=\"123\" width=\"1707\" height=\"984\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 521.961,1106.38 521.961,123.472 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 905.057,1106.38 905.057,123.472 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 1288.15,1106.38 1288.15,123.472 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 1671.25,1106.38 1671.25,123.472 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,1106.38 1872.76,1106.38 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 521.961,1106.38 521.961,1087.48 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 905.057,1106.38 905.057,1087.48 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 1288.15,1106.38 1288.15,1087.48 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 1671.25,1106.38 1671.25,1087.48 \n",
" \"/>\n",
"<path clip-path=\"url(#clip910)\" d=\"M466.487 1161 L474.126 1161 L474.126 1134.64 L465.816 1136.31 L465.816 1132.05 L474.08 1130.38 L478.755 1130.38 L478.755 1161 L486.394 1161 L486.394 1164.94 L466.487 1164.94 L466.487 1161 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M494.658 1130.38 L516.88 1130.38 L516.88 1132.37 L504.334 1164.94 L499.45 1164.94 L511.255 1134.32 L494.658 1134.32 L494.658 1130.38 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M526.047 1130.38 L544.403 1130.38 L544.403 1134.32 L530.329 1134.32 L530.329 1142.79 Q531.348 1142.44 532.366 1142.28 Q533.385 1142.09 534.403 1142.09 Q540.19 1142.09 543.57 1145.26 Q546.95 1148.44 546.95 1153.85 Q546.95 1159.43 543.477 1162.53 Q540.005 1165.61 533.686 1165.61 Q531.51 1165.61 529.241 1165.24 Q526.996 1164.87 524.589 1164.13 L524.589 1159.43 Q526.672 1160.56 528.894 1161.12 Q531.116 1161.68 533.593 1161.68 Q537.598 1161.68 539.936 1159.57 Q542.274 1157.46 542.274 1153.85 Q542.274 1150.24 539.936 1148.13 Q537.598 1146.03 533.593 1146.03 Q531.718 1146.03 529.843 1146.44 Q527.991 1146.86 526.047 1147.74 L526.047 1130.38 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M566.162 1133.46 Q562.551 1133.46 560.723 1137.02 Q558.917 1140.56 558.917 1147.69 Q558.917 1154.8 560.723 1158.37 Q562.551 1161.91 566.162 1161.91 Q569.797 1161.91 571.602 1158.37 Q573.431 1154.8 573.431 1147.69 Q573.431 1140.56 571.602 1137.02 Q569.797 1133.46 566.162 1133.46 M566.162 1129.75 Q571.973 1129.75 575.028 1134.36 Q578.107 1138.94 578.107 1147.69 Q578.107 1156.42 575.028 1161.03 Q571.973 1165.61 566.162 1165.61 Q560.352 1165.61 557.274 1161.03 Q554.218 1156.42 554.218 1147.69 Q554.218 1138.94 557.274 1134.36 Q560.352 1129.75 566.162 1129.75 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M853.668 1161 L869.987 1161 L869.987 1164.94 L848.043 1164.94 L848.043 1161 Q850.705 1158.25 855.288 1153.62 Q859.895 1148.97 861.075 1147.63 Q863.321 1145.1 864.2 1143.37 Q865.103 1141.61 865.103 1139.92 Q865.103 1137.16 863.159 1135.43 Q861.238 1133.69 858.136 1133.69 Q855.937 1133.69 853.483 1134.45 Q851.052 1135.22 848.275 1136.77 L848.275 1132.05 Q851.099 1130.91 853.552 1130.33 Q856.006 1129.75 858.043 1129.75 Q863.413 1129.75 866.608 1132.44 Q869.802 1135.13 869.802 1139.62 Q869.802 1141.75 868.992 1143.67 Q868.205 1145.56 866.099 1148.16 Q865.52 1148.83 862.418 1152.05 Q859.316 1155.24 853.668 1161 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M889.802 1133.46 Q886.191 1133.46 884.362 1137.02 Q882.557 1140.56 882.557 1147.69 Q882.557 1154.8 884.362 1158.37 Q886.191 1161.91 889.802 1161.91 Q893.436 1161.91 895.242 1158.37 Q897.071 1154.8 897.071 1147.69 Q897.071 1140.56 895.242 1137.02 Q893.436 1133.46 889.802 1133.46 M889.802 1129.75 Q895.612 1129.75 898.668 1134.36 Q901.747 1138.94 901.747 1147.69 Q901.747 1156.42 898.668 1161.03 Q895.612 1165.61 889.802 1165.61 Q883.992 1165.61 880.913 1161.03 Q877.858 1156.42 877.858 1147.69 Q877.858 1138.94 880.913 1134.36 Q883.992 1129.75 889.802 1129.75 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M919.964 1133.46 Q916.353 1133.46 914.524 1137.02 Q912.719 1140.56 912.719 1147.69 Q912.719 1154.8 914.524 1158.37 Q916.353 1161.91 919.964 1161.91 Q923.598 1161.91 925.404 1158.37 Q927.233 1154.8 927.233 1147.69 Q927.233 1140.56 925.404 1137.02 Q923.598 1133.46 919.964 1133.46 M919.964 1129.75 Q925.774 1129.75 928.83 1134.36 Q931.908 1138.94 931.908 1147.69 Q931.908 1156.42 928.83 1161.03 Q925.774 1165.61 919.964 1165.61 Q914.154 1165.61 911.075 1161.03 Q908.02 1156.42 908.02 1147.69 Q908.02 1138.94 911.075 1134.36 Q914.154 1129.75 919.964 1129.75 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M950.126 1133.46 Q946.515 1133.46 944.686 1137.02 Q942.881 1140.56 942.881 1147.69 Q
" 167.215,1078.6 1872.76,1078.6 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 167.215,933.206 1872.76,933.206 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 167.215,787.815 1872.76,787.815 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 167.215,642.423 1872.76,642.423 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 167.215,497.032 1872.76,497.032 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 167.215,351.64 1872.76,351.64 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
" 167.215,206.248 1872.76,206.248 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,1106.38 167.215,123.472 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,1078.6 186.112,1078.6 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,933.206 186.112,933.206 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,787.815 186.112,787.815 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,642.423 186.112,642.423 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,497.032 186.112,497.032 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,351.64 186.112,351.64 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 167.215,206.248 186.112,206.248 \n",
" \"/>\n",
"<path clip-path=\"url(#clip910)\" d=\"M126.47 1064.4 Q122.859 1064.4 121.031 1067.96 Q119.225 1071.5 119.225 1078.63 Q119.225 1085.74 121.031 1089.3 Q122.859 1092.85 126.47 1092.85 Q130.105 1092.85 131.91 1089.3 Q133.739 1085.74 133.739 1078.63 Q133.739 1071.5 131.91 1067.96 Q130.105 1064.4 126.47 1064.4 M126.47 1060.69 Q132.281 1060.69 135.336 1065.3 Q138.415 1069.88 138.415 1078.63 Q138.415 1087.36 135.336 1091.97 Q132.281 1096.55 126.47 1096.55 Q120.66 1096.55 117.582 1091.97 Q114.526 1087.36 114.526 1078.63 Q114.526 1069.88 117.582 1065.3 Q120.66 1060.69 126.47 1060.69 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M56.9569 946.551 L64.5958 946.551 L64.5958 920.186 L56.2856 921.852 L56.2856 917.593 L64.5495 915.926 L69.2254 915.926 L69.2254 946.551 L76.8642 946.551 L76.8642 950.486 L56.9569 950.486 L56.9569 946.551 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M96.3086 919.005 Q92.6975 919.005 90.8688 922.57 Q89.0632 926.112 89.0632 933.241 Q89.0632 940.348 90.8688 943.912 Q92.6975 947.454 96.3086 947.454 Q99.9428 947.454 101.748 943.912 Q103.577 940.348 103.577 933.241 Q103.577 926.112 101.748 922.57 Q99.9428 919.005 96.3086 919.005 M96.3086 915.301 Q102.119 915.301 105.174 919.908 Q108.253 924.491 108.253 933.241 Q108.253 941.968 105.174 946.574 Q102.119 951.158 96.3086 951.158 Q90.4984 951.158 87.4197 946.574 Q84.3642 941.968 84.3642 933.241 Q84.3642 924.491 87.4197 919.908 Q90.4984 915.301 96.3086 915.301 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M126.47 919.005 Q122.859 919.005 121.031 922.57 Q119.225 926.112 119.225 933.241 Q119.225 940.348 121.031 943.912 Q122.859 947.454 126.47 947.454 Q130.105 947.454 131.91 943.912 Q133.739 940.348 133.739 933.241 Q133.739 926.112 131.91 922.57 Q130.105 919.005 126.47 919.005 M126.47 915.301 Q132.281 915.301 135.336 919.908 Q138.415 924.491 138.415 933.241 Q138.415 941.968 135.336 946.574 Q132.281 951.158 126.47 951.158 Q120.66 951.158 117.582 946.574 Q114.526 941.968 114.526 933.241 Q114.526 924.491 117.582 919.908 Q120.66 915.301 126.47 915.301 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M60.1745 801.16 L76.4939 801.16 L76.4939 805.095 L54.5495 805.095 L54.5495 801.16 Q57.2115 798.405 61.7949 793.775 Q66.4013 789.123 67.5819 787.78 Q69.8272 785.257 70.7068 783.521 Q71.6096 781.762 71.6096 780.072 Q71.6096 777.317 69.6652 775.581 Q67.7439 773.845 64.6421 773.845 Q62.443 773.845 59.9893 774.609 Q57.5588 775.373 54.781 776.924 L54.781 772.201 Q57.6051 771.067 60.0588 770.489 Q62.5124 769.91 64.5495 769.91 Q69.9198 769.91 73.1142 772.595 Q76.3087 775.28 76.3087 779.771 Q76.3087 781.9 75.4985 783.822 Q74.7115 785.72 72.605 788.312 Q72.0263 788.984 68.9245 792.201 Q65.8226 795.396 60.1745 801.16 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M96.3086 773.613 Q92.6975 773.613 90.8688 777.178 Q89.0632 780.72 89.0632 787.85 Q89.0632 794.956 90.8688 798.521 Q92.6975 802.062 96.3086 802.062 Q99.9428 802.062 101.748 798.521 Q103.577 794.956 103.577 787.85 Q103.577 780.72 101.748 777.178 Q99.9428 773.613 96.3086 773.613 M96.3086 769.91 Q102.119 769.91 105.174 774.516 Q108.253 779.1 108.253 787.85 Q108.253 796.576 105.174 801.183 Q102.119 805.766 96.3086 805.766 Q90.4984 805.766 87.4197 801.183 Q84.3642 796.576 84.3642 787.85 Q84.3642 779.1 87.4197 774.516 Q90.4984 769.91 96.3086 769.91 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M126.47 773.613 Q122.859 773.613 121.031 777.178 Q119.225 780.72 119.225 787.85 Q119.225 794.956 121.031 798.521 Q122.859 802.062 126.47 802.062 Q130.105 802.062 131.91 798.521 Q133.739 794.956 133.739 787.85 Q133.739 780.72 131.91 777.178 Q130.105 773.613 126.47 773.613 M126.47 769.91 Q132.281 769.91 135.336 774.516 Q138.415 779.1 138.415 787.85 Q138.415 796.576 135.336 801.183 Q132.281 805.766 126.47 805.766 Q120.
" 215.485,1078.56 253.794,1078.56 292.104,1078.56 299.766,1078.56 330.413,1078.56 368.723,1078.53 407.033,1078.49 445.342,1078.49 521.961,1078.2 560.271,1078.2 \n",
" 598.58,1078.16 613.904,1078.23 636.89,1078.13 675.199,1078.09 690.523,1078.2 713.509,1078.09 721.171,1078.16 751.819,1078.05 790.128,1078.05 813.114,1078.13 \n",
" 828.438,1078.2 866.747,1078.05 889.733,1078.09 905.057,1077.8 920.381,1077.98 951.028,1077.83 958.69,1077.8 966.352,1077.98 974.014,1077.98 981.676,1077.73 \n",
" 989.338,1077.8 997,1077.76 1004.66,1077.76 1012.32,1077.8 1019.99,1077.8 1035.31,1077.69 1042.97,1077.69 1050.63,1077.43 1058.29,1077.76 1065.96,1077.54 \n",
" 1088.94,1077.4 1096.6,1077.25 1104.27,1077.36 1119.59,1077.25 1127.25,1077.18 1134.91,1077.18 1142.58,1077.07 1150.24,1077.04 1157.9,1076.96 1165.56,1076.89 \n",
" 1173.22,1076.82 1180.89,1076.74 1188.55,1076.67 1196.21,1076.6 1203.87,1076.56 1211.53,1076.45 1219.2,1076.38 1226.86,1076.31 1234.52,1076.05 1242.18,1076.13 \n",
" 1249.84,1075.76 1257.5,1075.91 1265.17,1075.69 1272.83,1075.4 1280.49,1075.54 1288.15,1075.22 1295.81,1075.11 1303.48,1074.85 1311.14,1074.6 1318.8,1074.24 \n",
" 1326.46,1074.24 1334.12,1073.69 1341.79,1073.29 1349.45,1073.15 1357.11,1072.49 1364.77,1071.98 1372.43,1071.26 1380.1,1070.75 1387.76,1069.8 1395.42,1068.86 \n",
" 1403.08,1067.84 1410.74,1066.68 1418.4,1065.37 1426.07,1064.2 1433.73,1062.46 1441.39,1060.5 1449.05,1058.39 1456.71,1055.92 1464.38,1053.52 1472.04,1050.46 \n",
" 1479.7,1046.83 1487.36,1043.34 1495.02,1038.98 1502.69,1034.54 1510.35,1029.67 1518.01,1024.66 1525.67,1018.7 1533.33,1013.1 1541,1006.85 1548.66,1000.38 \n",
" 1563.98,986.783 1579.3,972.898 1594.63,958.795 1602.29,951.598 1609.95,944.547 1632.94,922.956 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#0000ff; stroke-linecap:butt; stroke-linejoin:round; stroke-width:8; stroke-opacity:1; fill:none\" stroke-dasharray=\"4, 8\" points=\"\n",
" 491.314,151.29 1096.6,724.061 1196.21,817.693 1211.53,832.087 1249.84,867.926 1265.17,882.174 1272.83,889.298 1288.15,903.474 1295.81,910.598 1318.8,931.607 \n",
" 1326.46,938.586 1334.12,945.71 1341.79,952.398 1349.45,959.159 1357.11,966.138 1364.77,972.608 1372.43,979.514 1387.76,992.454 1395.42,998.633 1403.08,1005.1 \n",
" 1410.74,1011.28 1418.4,1017.1 1426.07,1023.2 1433.73,1028.8 1441.39,1034.84 1449.05,1039.27 1456.71,1044.07 1464.38,1048.72 1472.04,1053.01 1479.7,1057.08 \n",
" 1487.36,1060.35 1495.02,1063.48 1502.69,1066.39 1510.35,1068.64 1518.01,1070.67 1525.67,1072.42 1533.33,1073.44 1541,1074.64 1548.66,1075.47 1556.32,1076.02 \n",
" 1563.98,1076.64 1571.64,1076.93 1579.3,1077.11 1586.97,1077.29 1594.63,1077.76 1602.29,1078.05 1609.95,1077.87 1617.61,1077.91 1625.28,1077.98 1632.94,1078.2 \n",
" 1640.6,1078.23 1648.26,1078.02 1655.92,1078.02 1663.59,1078.05 1671.25,1078.34 1678.91,1078.09 1686.57,1078.09 1709.56,1078.42 1747.87,1078.45 1824.49,1078.53 \n",
" \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip912)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:8; stroke-opacity:1; fill:none\" stroke-dasharray=\"32, 20\" points=\"\n",
" 1469.07,2089.29 1469.07,-859.436 \n",
" \"/>\n",
"<path clip-path=\"url(#clip910)\" d=\"\n",
"M1415.01 363.596 L1815.9 363.596 L1815.9 156.236 L1415.01 156.236 Z\n",
" \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 1415.01,363.596 1815.9,363.596 1815.9,156.236 1415.01,156.236 1415.01,363.596 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip910)\" style=\"stroke:#ff0000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
" 1433.96,208.076 1547.67,208.076 \n",
" \"/>\n",
"<path clip-path=\"url(#clip910)\" d=\"M1570.9 221.467 L1570.9 235.217 L1566.62 235.217 L1566.62 199.43 L1570.9 199.43 L1570.9 203.365 Q1572.24 201.05 1574.28 199.939 Q1576.34 198.805 1579.19 198.805 Q1583.91 198.805 1586.85 202.555 Q1589.81 206.305 1589.81 212.416 Q1589.81 218.527 1586.85 222.277 Q1583.91 226.027 1579.19 226.027 Q1576.34 226.027 1574.28 224.916 Q1572.24 223.782 1570.9 221.467 M1585.39 212.416 Q1585.39 207.717 1583.44 205.055 Q1581.52 202.37 1578.14 202.37 Q1574.76 202.37 1572.82 205.055 Q1570.9 207.717 1570.9 212.416 Q1570.9 217.115 1572.82 219.8 Q1574.76 222.462 1578.14 222.462 Q1581.52 222.462 1583.44 219.8 Q1585.39 217.115 1585.39 212.416 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1596.43 215.124 L1596.43 199.43 L1600.69 199.43 L1600.69 214.962 Q1600.69 218.643 1602.12 220.495 Q1603.56 222.323 1606.43 222.323 Q1609.88 222.323 1611.87 220.124 Q1613.88 217.925 1613.88 214.129 L1613.88 199.43 L1618.14 199.43 L1618.14 225.356 L1613.88 225.356 L1613.88 221.374 Q1612.33 223.735 1610.27 224.893 Q1608.24 226.027 1605.53 226.027 Q1601.06 226.027 1598.75 223.249 Q1596.43 220.471 1596.43 215.124 M1607.15 198.805 L1607.15 198.805 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1631.13 192.069 L1631.13 199.43 L1639.9 199.43 L1639.9 202.74 L1631.13 202.74 L1631.13 216.814 Q1631.13 219.985 1631.99 220.888 Q1632.87 221.791 1635.53 221.791 L1639.9 221.791 L1639.9 225.356 L1635.53 225.356 Q1630.6 225.356 1628.72 223.527 Q1626.85 221.675 1626.85 216.814 L1626.85 202.74 L1623.72 202.74 L1623.72 199.43 L1626.85 199.43 L1626.85 192.069 L1631.13 192.069 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1662.03 200.194 L1662.03 204.222 Q1660.23 203.296 1658.28 202.833 Q1656.34 202.37 1654.25 202.37 Q1651.08 202.37 1649.49 203.342 Q1647.91 204.314 1647.91 206.259 Q1647.91 207.74 1649.05 208.597 Q1650.18 209.43 1653.61 210.194 L1655.06 210.518 Q1659.6 211.49 1661.5 213.272 Q1663.42 215.032 1663.42 218.203 Q1663.42 221.814 1660.55 223.921 Q1657.7 226.027 1652.7 226.027 Q1650.62 226.027 1648.35 225.61 Q1646.11 225.217 1643.61 224.407 L1643.61 220.009 Q1645.97 221.235 1648.26 221.86 Q1650.55 222.462 1652.8 222.462 Q1655.81 222.462 1657.43 221.444 Q1659.05 220.402 1659.05 218.527 Q1659.05 216.791 1657.87 215.865 Q1656.71 214.939 1652.75 214.083 L1651.27 213.735 Q1647.31 212.902 1645.55 211.189 Q1643.79 209.453 1643.79 206.444 Q1643.79 202.786 1646.38 200.796 Q1648.98 198.805 1653.75 198.805 Q1656.11 198.805 1658.19 199.152 Q1660.27 199.499 1662.03 200.194 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><polyline clip-path=\"url(#clip910)\" style=\"stroke:#0000ff; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" stroke-dasharray=\"2, 4\" points=\"\n",
" 1433.96,259.916 1547.67,259.916 \n",
" \"/>\n",
"<path clip-path=\"url(#clip910)\" d=\"M1587.13 252.265 L1587.13 256.247 Q1585.32 255.251 1583.49 254.765 Q1581.69 254.256 1579.83 254.256 Q1575.69 254.256 1573.4 256.895 Q1571.11 259.511 1571.11 264.256 Q1571.11 269.001 1573.4 271.64 Q1575.69 274.256 1579.83 274.256 Q1581.69 274.256 1583.49 273.77 Q1585.32 273.261 1587.13 272.265 L1587.13 276.2 Q1585.34 277.034 1583.42 277.45 Q1581.52 277.867 1579.37 277.867 Q1573.51 277.867 1570.06 274.186 Q1566.62 270.506 1566.62 264.256 Q1566.62 257.913 1570.09 254.279 Q1573.58 250.645 1579.65 250.645 Q1581.62 250.645 1583.49 251.062 Q1585.37 251.455 1587.13 252.265 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1606.31 264.163 Q1601.15 264.163 1599.16 265.344 Q1597.17 266.524 1597.17 269.372 Q1597.17 271.64 1598.65 272.983 Q1600.16 274.302 1602.73 274.302 Q1606.27 274.302 1608.4 271.802 Q1610.55 269.279 1610.55 265.112 L1610.55 264.163 L1606.31 264.163 M1614.81 262.404 L1614.81 277.196 L1610.55 277.196 L1610.55 273.261 Q1609.09 275.622 1606.92 276.756 Q1604.74 277.867 1601.59 277.867 Q1597.61 277.867 1595.25 275.645 Q1592.91 273.399 1592.91 269.649 Q1592.91 265.274 1595.83 263.052 Q1598.77 260.83 1604.58 260.83 L1610.55 260.83 L1610.55 260.413 Q1610.55 257.474 1608.61 255.876 Q1606.69 254.256 1603.19 254.256 Q1600.97 254.256 1598.86 254.788 Q1596.75 255.321 1594.81 256.386 L1594.81 252.45 Q1597.15 251.548 1599.35 251.108 Q1601.55 250.645 1603.63 250.645 Q1609.25 250.645 1612.03 253.562 Q1614.81 256.478 1614.81 262.404 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1623.58 241.177 L1627.84 241.177 L1627.84 277.196 L1623.58 277.196 L1623.58 241.177 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1636.75 241.177 L1641.01 241.177 L1641.01 277.196 L1636.75 277.196 L1636.75 241.177 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1666.45 252.034 L1666.45 256.062 Q1664.65 255.136 1662.7 254.673 Q1660.76 254.21 1658.68 254.21 Q1655.5 254.21 1653.91 255.182 Q1652.33 256.154 1652.33 258.099 Q1652.33 259.58 1653.47 260.437 Q1654.6 261.27 1658.03 262.034 L1659.49 262.358 Q1664.02 263.33 1665.92 265.112 Q1667.84 266.872 1667.84 270.043 Q1667.84 273.654 1664.97 275.761 Q1662.12 277.867 1657.12 277.867 Q1655.04 277.867 1652.77 277.45 Q1650.53 277.057 1648.03 276.247 L1648.03 271.849 Q1650.39 273.075 1652.68 273.7 Q1654.97 274.302 1657.22 274.302 Q1660.23 274.302 1661.85 273.284 Q1663.47 272.242 1663.47 270.367 Q1663.47 268.631 1662.29 267.705 Q1661.13 266.779 1657.17 265.923 L1655.69 265.575 Q1651.73 264.742 1649.97 263.029 Q1648.21 261.293 1648.21 258.284 Q1648.21 254.626 1650.81 252.636 Q1653.4 250.645 1658.17 250.645 Q1660.53 250.645 1662.61 250.992 Q1664.69 251.339 1666.45 252.034 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><polyline clip-path=\"url(#clip910)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" stroke-dasharray=\"16, 10\" points=\"\n",
" 1433.96,311.756 1547.67,311.756 \n",
" \"/>\n",
"<path clip-path=\"url(#clip910)\" d=\"M1588.86 295.61 L1588.86 300.17 Q1586.2 298.897 1583.84 298.272 Q1581.48 297.647 1579.28 297.647 Q1575.46 297.647 1573.38 299.128 Q1571.31 300.61 1571.31 303.341 Q1571.31 305.633 1572.68 306.814 Q1574.07 307.971 1577.91 308.689 L1580.74 309.267 Q1585.97 310.263 1588.44 312.786 Q1590.94 315.286 1590.94 319.499 Q1590.94 324.522 1587.56 327.114 Q1584.21 329.707 1577.7 329.707 Q1575.25 329.707 1572.47 329.151 Q1569.72 328.596 1566.75 327.508 L1566.75 322.693 Q1569.6 324.29 1572.33 325.101 Q1575.06 325.911 1577.7 325.911 Q1581.71 325.911 1583.88 324.337 Q1586.06 322.763 1586.06 319.846 Q1586.06 317.3 1584.49 315.864 Q1582.94 314.429 1579.37 313.712 L1576.52 313.156 Q1571.29 312.115 1568.95 309.892 Q1566.62 307.67 1566.62 303.712 Q1566.62 299.128 1569.83 296.49 Q1573.07 293.851 1578.75 293.851 Q1581.18 293.851 1583.7 294.291 Q1586.22 294.73 1588.86 295.61 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1602.91 298.318 L1602.91 311.304 L1608.79 311.304 Q1612.06 311.304 1613.84 309.615 Q1615.62 307.925 1615.62 304.8 Q1615.62 301.698 1613.84 300.008 Q1612.06 298.318 1608.79 298.318 L1602.91 298.318 M1598.24 294.476 L1608.79 294.476 Q1614.6 294.476 1617.56 297.115 Q1620.55 299.73 1620.55 304.8 Q1620.55 309.915 1617.56 312.531 Q1614.6 315.147 1608.79 315.147 L1602.91 315.147 L1602.91 329.036 L1598.24 329.036 L1598.24 294.476 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1625.16 294.476 L1630.18 294.476 L1638.77 307.323 L1647.4 294.476 L1652.43 294.476 L1641.31 311.073 L1653.17 329.036 L1648.14 329.036 L1638.42 314.337 L1628.63 329.036 L1623.58 329.036 L1635.92 310.587 L1625.16 294.476 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1674.18 293.017 L1678.44 293.017 L1678.44 329.036 L1674.18 329.036 L1674.18 293.017 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1709.53 315.008 L1709.53 317.091 L1689.95 317.091 Q1690.23 321.489 1692.59 323.804 Q1694.97 326.096 1699.21 326.096 Q1701.66 326.096 1703.95 325.494 Q1706.27 324.892 1708.54 323.689 L1708.54 327.716 Q1706.24 328.688 1703.84 329.198 Q1701.43 329.707 1698.95 329.707 Q1692.75 329.707 1689.12 326.096 Q1685.5 322.485 1685.5 316.327 Q1685.5 309.962 1688.93 306.235 Q1692.38 302.485 1698.21 302.485 Q1703.44 302.485 1706.48 305.865 Q1709.53 309.221 1709.53 315.008 M1705.27 313.758 Q1705.23 310.263 1703.3 308.179 Q1701.41 306.096 1698.26 306.096 Q1694.69 306.096 1692.54 308.11 Q1690.41 310.124 1690.09 313.781 L1705.27 313.758 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1713.47 303.11 L1717.98 303.11 L1726.08 324.869 L1734.18 303.11 L1738.7 303.11 L1728.98 329.036 L1723.19 329.036 L1713.47 303.11 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1766.75 315.008 L1766.75 317.091 L1747.17 317.091 Q1747.45 321.489 1749.81 323.804 Q1752.19 326.096 1756.43 326.096 Q1758.88 326.096 1761.18 325.494 Q1763.49 324.892 1765.76 323.689 L1765.76 327.716 Q1763.47 328.688 1761.06 329.198 Q1758.65 329.707 1756.18 329.707 Q1749.97 329.707 1746.34 326.096 Q1742.73 322.485 1742.73 316.327 Q1742.73 309.962 1746.15 306.235 Q1749.6 302.485 1755.43 302.485 Q1760.67 302.485 1763.7 305.865 Q1766.75 309.221 1766.75 315.008 M1762.49 313.758 Q1762.45 310.263 1760.53 308.179 Q1758.63 306.096 1755.48 306.096 Q1751.92 306.096 1749.76 308.11 Q1747.63 310.124 1747.31 313.781 L1762.49 313.758 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip910)\" d=\"M1773.74 293.017 L1778 293.017 L1778 329.036 L1773.74 329.036 L1773.74 293.017 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /></svg>\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"vv_P = df_20170421.call_put .== \"P\" #put options\n",
"vv_C = df_20170421.call_put .== \"C\" #call options\n",
"\n",
"midPrice = (df_20170421.ask + df_20170421.bid)/2 #creates a traditional vector\n",
"\n",
"p1 = plot( df_20170421.strike[vv_P],midPrice[vv_P],label=\"puts\",\n",
" linecolor = :red,\n",
" linestyle = :solid,\n",
" linewidth = 1,\n",
" title = \"Option prices $(df_20170421.date[1])\",\n",
" xlabel = \"strike prices\" )\n",
"plot!( df_20170421.strike[vv_C],midPrice[vv_C],label=\"calls\",\n",
" linecolor = :blue,\n",
" linestyle = :dot,\n",
" linewidth = 2 )\n",
"vline!([df_20170421.close[1]],linecolor=:black,line=(:dash,2),label=\"SPX level\")\n",
"display(p1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"@webio": {
"lastCommId": null,
"lastKernelId": null
},
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Julia 1.7.0",
"language": "julia",
"name": "julia-1.7"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.7.0"
},
"nteract": {
"version": "0.23.1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}