<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://quantsoftware.gatech.edu/index.php?action=history&amp;feed=atom&amp;title=Spring_2019_Project_5%3A_Marketsim</id>
	<title>Spring 2019 Project 5: Marketsim - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://quantsoftware.gatech.edu/index.php?action=history&amp;feed=atom&amp;title=Spring_2019_Project_5%3A_Marketsim"/>
	<link rel="alternate" type="text/html" href="http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;action=history"/>
	<updated>2026-05-25T01:44:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.4</generator>
	<entry>
		<id>http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=3061&amp;oldid=prev</id>
		<title>Ssung40: /* FAQs */</title>
		<link rel="alternate" type="text/html" href="http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=3061&amp;oldid=prev"/>
		<updated>2019-02-21T20:38:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;FAQs&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:38, 21 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l294&quot; &gt;Line 294:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 294:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Q: Should we assume the prices stay the same the whole day?  A: Assume execution prices are adjusted close.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Q: Should we assume the prices stay the same the whole day?  A: Assume execution prices are adjusted close.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Q: So buying any stocks won&amp;#039;t change our portfolio&amp;#039;s value (but selling will), correct?  A: If you mark the value of the portfolio to the market as of close.  Neither buying or selling will affect the value.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Q: Do we return portvals daily for the entire periods including weekends, holidays and non-trading days?  A: Only consider trading days. This should happen for you automatically when using get_data() from util.py&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Q: Do we return portvals daily for the entire periods including weekends, holidays and non-trading days?  A: Only consider trading days. This should happen for you automatically when using get_data() from util.py&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ssung40</name></author>
		
	</entry>
	<entry>
		<id>http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=3060&amp;oldid=prev</id>
		<title>Ssung40: /* FAQs */</title>
		<link rel="alternate" type="text/html" href="http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=3060&amp;oldid=prev"/>
		<updated>2019-02-21T20:37:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;FAQs&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:37, 21 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l300&quot; &gt;Line 300:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 300:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Q: It seems like my avg_daily_returns and std are off compared to the wiki&amp;#039;s because of this. If not, do we count trading days only for when list of symbols (or SPY) are traded A: Assume the market was open iff SPY was traded.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Q: It seems like my avg_daily_returns and std are off compared to the wiki&amp;#039;s because of this. If not, do we count trading days only for when list of symbols (or SPY) are traded A: Assume the market was open iff SPY was traded.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Q: Is it okay to have NaNs in the final portfolio values that the function outputs? A: No, you should have a real number value for every date in the final portfolio value.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Legacy==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Legacy==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ssung40</name></author>
		
	</entry>
	<entry>
		<id>http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=3059&amp;oldid=prev</id>
		<title>Ssung40: /* Required, Allowed &amp; Prohibited */</title>
		<link rel="alternate" type="text/html" href="http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=3059&amp;oldid=prev"/>
		<updated>2019-02-14T18:28:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Required, Allowed &amp;amp; Prohibited&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:28, 14 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l261&quot; &gt;Line 261:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 261:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Required:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Required:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Your project must be coded in Python 2.7.x.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Your project must be coded in Python 2.7.x.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Your code must run on one of the university-provided computers (e.g. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;buffet02&lt;/del&gt;.cc.gatech.edu).&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Your code must run on one of the university-provided computers (e.g. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;buffet0&lt;/ins&gt;.cc.gatech.edu).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* When utilizing any of the example orders files code must run in less than 10 seconds on one of the university-provided computers.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* When utilizing any of the example orders files code must run in less than 10 seconds on one of the university-provided computers.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To read in stock data, use only the functions in util.py,  &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To read in stock data, use only the functions in util.py&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. Only use the API methods provided here. Do NOT modify this file. For grading&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;we will use our own unmodified version.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Allowed:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Allowed:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l275&quot; &gt;Line 275:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 275:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Prohibited:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Prohibited:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Global variables.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Global variables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Reading in data by any means other than the functions in util.py or pandas.read_csv()&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Reading in data by any means other than the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;API &lt;/ins&gt;functions in util.py or pandas.read_csv()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Any libraries or modules not listed in the &amp;quot;allowed&amp;quot; section above.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Any libraries or modules not listed in the &amp;quot;allowed&amp;quot; section above.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Any code you did not write yourself.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Any code you did not write yourself.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ssung40</name></author>
		
	</entry>
	<entry>
		<id>http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=2996&amp;oldid=prev</id>
		<title>Greg at 01:22, 4 January 2019</title>
		<link rel="alternate" type="text/html" href="http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=2996&amp;oldid=prev"/>
		<updated>2019-01-04T01:22:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:22, 4 January 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot; &gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Instructions:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Instructions:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Download the appropriate zip file [[File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;18fall_marketsim&lt;/del&gt;.zip]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Download the appropriate zip file [[File:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;19spring_marketsim&lt;/ins&gt;.zip]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Implement the &amp;lt;tt&amp;gt;compute_portvals()&amp;lt;/tt&amp;gt; function in the file &amp;lt;tt&amp;gt;marketsim/marketsim.py&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Implement the &amp;lt;tt&amp;gt;compute_portvals()&amp;lt;/tt&amp;gt; function in the file &amp;lt;tt&amp;gt;marketsim/marketsim.py&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The grading script is &amp;lt;tt&amp;gt;marketsim/grade_marketsim.py&amp;lt;/tt&amp;gt;. For more details see here: [[ML4T_Software_Setup#Running_the_grading_scripts]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The grading script is &amp;lt;tt&amp;gt;marketsim/grade_marketsim.py&amp;lt;/tt&amp;gt;. For more details see here: [[ML4T_Software_Setup#Running_the_grading_scripts]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Greg</name></author>
		
	</entry>
	<entry>
		<id>http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=2974&amp;oldid=prev</id>
		<title>David.joyner: Created page with &quot;==Revisions==  This assignment is subject to change up until 3 weeks prior to the due date. We do not anticipate changes; any changes will be logged in this section.  ==Overvi...&quot;</title>
		<link rel="alternate" type="text/html" href="http://quantsoftware.gatech.edu/index.php?title=Spring_2019_Project_5:_Marketsim&amp;diff=2974&amp;oldid=prev"/>
		<updated>2019-01-03T20:46:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Revisions==  This assignment is subject to change up until 3 weeks prior to the due date. We do not anticipate changes; any changes will be logged in this section.  ==Overvi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Revisions==&lt;br /&gt;
&lt;br /&gt;
This assignment is subject to change up until 3 weeks prior to the due date. We do not anticipate changes; any changes will be logged in this section.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
In this project you will create a market simulator that accepts trading orders and keeps track of a portfolio&amp;#039;s value over time and then assesses the performance of that portfolio.&lt;br /&gt;
&lt;br /&gt;
==Template==&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the appropriate zip file [[File:18fall_marketsim.zip]]&lt;br /&gt;
* Implement the &amp;lt;tt&amp;gt;compute_portvals()&amp;lt;/tt&amp;gt; function in the file &amp;lt;tt&amp;gt;marketsim/marketsim.py&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* The grading script is &amp;lt;tt&amp;gt;marketsim/grade_marketsim.py&amp;lt;/tt&amp;gt;. For more details see here: [[ML4T_Software_Setup#Running_the_grading_scripts]]&lt;br /&gt;
&lt;br /&gt;
==Part 1: Basic simulator (90 points)==&lt;br /&gt;
&lt;br /&gt;
Your job is to implement your market simulator as a function, &amp;lt;tt&amp;gt;compute_portvals()&amp;lt;/tt&amp;gt; that returns a dataframe with one column.  You should implement it within the file &amp;lt;tt&amp;gt;marketsim.py&amp;lt;/tt&amp;gt;. It should adhere to the following API:&lt;br /&gt;
&lt;br /&gt;
 def compute_portvals(orders_file = &amp;quot;./orders/orders.csv&amp;quot;, start_val = 1000000, commission = 9.95, impact = 0.005):&lt;br /&gt;
     # TODO: Your code here&lt;br /&gt;
     return portvals&lt;br /&gt;
&lt;br /&gt;
The start date and end date of the simulation are the first and last dates with orders in the &amp;lt;tt&amp;gt;orders_file&amp;lt;/tt&amp;gt;.  The arguments are as follows:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;orders_file&amp;lt;/tt&amp;gt; is the name of a file from which to read orders, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;start_val&amp;lt;/tt&amp;gt; is the starting value of the portfolio (initial cash available)&lt;br /&gt;
* &amp;lt;tt&amp;gt;commission&amp;lt;/tt&amp;gt; is the fixed amount in dollars charged for each transaction (both entry and exit)&lt;br /&gt;
* &amp;lt;tt&amp;gt;impact&amp;lt;/tt&amp;gt; is the amount the price moves against the trader compared to the historical data at each transaction&lt;br /&gt;
&lt;br /&gt;
Return the result (&amp;lt;tt&amp;gt;portvals&amp;lt;/tt&amp;gt;) as a single-column &amp;lt;tt&amp;gt;pandas.DataFrame&amp;lt;/tt&amp;gt; (column name does not matter), containing the value of the portfolio for each trading day in the first column from &amp;lt;tt&amp;gt;start_date&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;end_date&amp;lt;/tt&amp;gt;, inclusive.&lt;br /&gt;
&lt;br /&gt;
The files containing orders are CSV files with the following columns:&lt;br /&gt;
&lt;br /&gt;
* Date (yyyy-mm-dd)&lt;br /&gt;
* Symbol (e.g. AAPL, GOOG)&lt;br /&gt;
* Order (BUY or SELL)&lt;br /&gt;
* Shares (no. of shares to trade)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 Date,Symbol,Order,Shares&lt;br /&gt;
 2008-12-3,AAPL,BUY,130&lt;br /&gt;
 2008-12-8,AAPL,SELL,130&lt;br /&gt;
 2008-12-5,IBM,BUY,50&lt;br /&gt;
&lt;br /&gt;
Your simulator should calculate the total value of the portfolio for each day using &amp;lt;b&amp;gt;adjusted closing prices&amp;lt;/b&amp;gt;. The value for each day is cash plus the current value of equities. The resulting data frame should contain values like this:&lt;br /&gt;
&lt;br /&gt;
 2008-12-3 1000000&lt;br /&gt;
 2008-12-4 1000010&lt;br /&gt;
 2008-12-5 1000250&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
==How it should work==&lt;br /&gt;
&lt;br /&gt;
Your code should keep account of how many shares of each stock are in the portfolio on each day and how much cash is available on each day.  Note that negative shares and negative cash are possible.  Negative shares mean that the portfolio is in a short position for that stock.  Negative cash means that you&amp;#039;ve borrowed money from the broker.&lt;br /&gt;
&lt;br /&gt;
When a BUY order occurs, you should add the appropriate number of shares to the count for that stock and subtract the appropriate cost of the shares from the cash account.  The cost should be determined using the adjusted close price for that stock on that day.&lt;br /&gt;
&lt;br /&gt;
When a SELL order occurs, it works in reverse: You should subtract the number of shares from the count and add to the cash account.&lt;br /&gt;
&lt;br /&gt;
==Evaluation==&lt;br /&gt;
&lt;br /&gt;
We will evaluate your code by calling &amp;lt;tt&amp;gt;compute_portvals()&amp;lt;/tt&amp;gt; with multiple test cases.  No other function in your code will be called by us, so do not depend on &amp;quot;main&amp;quot; code being called.  Do not depend on global variables.&lt;br /&gt;
&lt;br /&gt;
For debugging purposes, you should write your own additional helper function to call &amp;lt;tt&amp;gt;compute_portvals()&amp;lt;/tt&amp;gt; with your own test cases. We suggest that you report the following factors:&lt;br /&gt;
&lt;br /&gt;
* Plot the price history over the trading period.&lt;br /&gt;
* Sharpe ratio (Always assume you have 252 trading days in an year. And risk free rate = 0) of the total portfolio&lt;br /&gt;
* Cumulative return of the total portfolio&lt;br /&gt;
* Standard deviation of daily returns of the total portfolio&lt;br /&gt;
* Average daily return of the total portfolio&lt;br /&gt;
* Ending value of the portfolio&lt;br /&gt;
&lt;br /&gt;
==Part 2: Transaction Costs (10 points)==&lt;br /&gt;
&lt;br /&gt;
Note: We strongly encourage you to get the basic simulator working before you implement the transaction cost and market impact components of this project.  Ok, now on to transaction costs.&lt;br /&gt;
&lt;br /&gt;
Transaction costs are an important consideration for investing strategy. Transaction costs include things like commissions, slippage, market impact and tax considerations.  High transaction costs encourage less frequent trading, and accordingly a search for strategies that pay out over longer periods of time rather than just intraday or over several days.  For this project we will consider two components of transaction cost: Commissions and market impact:&lt;br /&gt;
&lt;br /&gt;
* Commissions: For each trade that you execute, charge a commission according to the parameter sent.  Treat that as a deduction from your cash balance.&lt;br /&gt;
* Market impact: For each trade that you execute, assume that the stock price moves against you according to the &amp;lt;tt&amp;gt;impact&amp;lt;/tt&amp;gt; parameter.  So if you are buying, assume the price goes up before your purchase.  Similarly, if selling, assume the price drops 50 bps before the sale. For simplicity treat the market impact penalty as a deduction from your cash balance.&lt;br /&gt;
&lt;br /&gt;
Both of these penalties should be applied for EACH transaction, for instance, depending on the parameter settings, a complete entry and exit will cost 2 * $9.95, plus 0.5% of the entry price and 0.5% of the exit price.&lt;br /&gt;
&lt;br /&gt;
==Part 3: Implement author() function (deduction if not implemented)==&lt;br /&gt;
&lt;br /&gt;
You should implement a function called &amp;lt;tt&amp;gt;author()&amp;lt;/tt&amp;gt; that returns your Georgia Tech user ID as a string. This is the ID you use to log into t-square.  It is not your 9 digit student number.  Here is an example of how you might implement author():&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def author():&lt;br /&gt;
        return &amp;#039;tb34&amp;#039; # replace tb34 with your Georgia Tech username.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And here&amp;#039;s an example of how it could be called from a testing program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    import marketsim as ms&lt;br /&gt;
    print ms.author()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the template code for examples. We are adding those to the repo now, but it might not be there if you check right away.  Implementing this method correctly does not provide any points, but there will be a penalty for not implementing it.&lt;br /&gt;
&lt;br /&gt;
==Orders files to run your code on==&lt;br /&gt;
&lt;br /&gt;
Example orders files are available in the orders subdirectory.&lt;br /&gt;
&lt;br /&gt;
Here are some additional test cases: &lt;br /&gt;
* [[Media:Testcases_mc2p1.zip|testcases_mc2p1.zip]]&lt;br /&gt;
* [[Media:additional_orders.zip|additional_orders.zip]]&lt;br /&gt;
&lt;br /&gt;
==Short example to check your code==&lt;br /&gt;
&lt;br /&gt;
Here is a very very short example that you can use to check your code.  Starting conditions:&lt;br /&gt;
&lt;br /&gt;
 start_val = 1000000&lt;br /&gt;
&lt;br /&gt;
For the orders file &amp;lt;tt&amp;gt;orders-short.csv&amp;lt;/tt&amp;gt;, the orders are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Date,Symbol,Order,Shares&lt;br /&gt;
2011-01-05,AAPL,BUY,1500&lt;br /&gt;
2011-01-20,AAPL,SELL,1500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The daily value of the portfolio (spaces added to help things line up):&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
2011-01-05     997495.775&lt;br /&gt;
2011-01-06     997090.775&lt;br /&gt;
2011-01-07    1000660.775&lt;br /&gt;
2011-01-10    1010125.775&lt;br /&gt;
2011-01-11    1008910.775&lt;br /&gt;
2011-01-12    1013065.775&lt;br /&gt;
2011-01-13    1014940.775&lt;br /&gt;
2011-01-14    1019125.775&lt;br /&gt;
2011-01-18    1007425.775&lt;br /&gt;
2011-01-19    1004725.775&lt;br /&gt;
2011-01-20     993036.375&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, here are the &amp;lt;b&amp;gt;adjusted close&amp;lt;/b&amp;gt; values for AAPL on the relevant days:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
              AAPL&lt;br /&gt;
2011-01-05  332.57&lt;br /&gt;
2011-01-06  332.30&lt;br /&gt;
2011-01-07  334.68&lt;br /&gt;
2011-01-10  340.99&lt;br /&gt;
2011-01-11  340.18&lt;br /&gt;
2011-01-12  342.95&lt;br /&gt;
2011-01-13  344.20&lt;br /&gt;
2011-01-14  346.99&lt;br /&gt;
2011-01-18  339.19&lt;br /&gt;
2011-01-19  337.39&lt;br /&gt;
2011-01-20  331.26&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full results:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Data Range: 2011-01-05 00:00:00 to 2011-01-20 00:00:00&lt;br /&gt;
&lt;br /&gt;
Sharpe Ratio of Fund: -1.00015025363&lt;br /&gt;
Sharpe Ratio of $SPX: 0.882168679776&lt;br /&gt;
&lt;br /&gt;
Cumulative Return of Fund: -0.00447059537671&lt;br /&gt;
Cumulative Return of $SPX: 0.00289841448894&lt;br /&gt;
&lt;br /&gt;
Standard Deviation of Fund: 0.00678073274458&lt;br /&gt;
Standard Deviation of $SPX: 0.00544933521991&lt;br /&gt;
&lt;br /&gt;
Average Daily Return of Fund: -0.000427210193308&lt;br /&gt;
Average Daily Return of $SPX: 0.000302827205547&lt;br /&gt;
&lt;br /&gt;
Final Portfolio Value: 993036.375&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==More comprehensive examples==&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;tt&amp;gt;orders.csv&amp;lt;/tt&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We provide an example, &amp;lt;tt&amp;gt;orders.csv&amp;lt;/tt&amp;gt; that you can use to test your code, and compare with others. All of these runs assume a starting portfolio of 1000000 ($1M).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Data Range: 2011-01-10 00:00:00 to 2011-12-20 00:00:00&lt;br /&gt;
&lt;br /&gt;
Sharpe Ratio of Fund: 0.997654521878&lt;br /&gt;
Sharpe Ratio of $SPX: 0.0183389807443&lt;br /&gt;
&lt;br /&gt;
Cumulative Return of Fund: 0.108872698544&lt;br /&gt;
Cumulative Return of $SPX: -0.0224059854302&lt;br /&gt;
&lt;br /&gt;
Standard Deviation of Fund: 0.00730509916835&lt;br /&gt;
Standard Deviation of $SPX: 0.0149716091522&lt;br /&gt;
&lt;br /&gt;
Average Daily Return of Fund: 0.000459098655493&lt;br /&gt;
Average Daily Return of $SPX: 1.7295909534e-05&lt;br /&gt;
&lt;br /&gt;
Final Portfolio Value: 1106025.8065&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;tt&amp;gt;orders2.csv&amp;lt;/tt&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
The other sample file is &amp;lt;tt&amp;gt;orders2.csv&amp;lt;/tt&amp;gt; that you can use to test your code, and compare with others. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Data Range: 2011-01-14 00:00:00 to 2011-12-14 00:00:00&lt;br /&gt;
&lt;br /&gt;
Sharpe Ratio of Fund: 0.552604907987&lt;br /&gt;
Sharpe Ratio of $SPX: -0.177203019906&lt;br /&gt;
&lt;br /&gt;
Cumulative Return of Fund: 0.0538411196951&lt;br /&gt;
Cumulative Return of $SPX: -0.0629581516192&lt;br /&gt;
&lt;br /&gt;
Standard Deviation of Fund: 0.00728172910323&lt;br /&gt;
Standard Deviation of $SPX: 0.0150564855724&lt;br /&gt;
&lt;br /&gt;
Average Daily Return of Fund: 0.000253483085898&lt;br /&gt;
Average Daily Return of $SPX: -0.000168071648902&lt;br /&gt;
&lt;br /&gt;
Final Portfolio Value: 1051088.0915&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Hints &amp;amp; resources==&lt;br /&gt;
&lt;br /&gt;
Here is a video outlining an approach to solving this problem [[https://www.youtube.com/watch?v=TstVUVbu-Tk youtube video]].&lt;br /&gt;
&lt;br /&gt;
Hint, use code like this to read in the orders file:&lt;br /&gt;
&lt;br /&gt;
 orders_df = pandas.read_csv(orders_file, index_col=&amp;#039;Date&amp;#039;, parse_dates=True, na_values=[&amp;#039;nan&amp;#039;])&lt;br /&gt;
&lt;br /&gt;
In terms of execution prices, you should assume you get the &amp;lt;B&amp;gt;adjusted close&amp;lt;/B&amp;gt; price for the day of the trade.&lt;br /&gt;
&lt;br /&gt;
==What to turn in==&lt;br /&gt;
Be sure to follow these instructions diligently!&lt;br /&gt;
&lt;br /&gt;
Via Canvas, submit as attachment (no zip files; refer to schedule for deadline):&lt;br /&gt;
&lt;br /&gt;
* Your code as &amp;lt;tt&amp;gt;marketsim.py&amp;lt;/tt&amp;gt; (only the function &amp;lt;tt&amp;gt;compute_portvals()&amp;lt;/tt&amp;gt; will be tested)&lt;br /&gt;
&lt;br /&gt;
Unlimited resubmissions are allowed up to the deadline for the project.&lt;br /&gt;
&lt;br /&gt;
==Rubric==&lt;br /&gt;
&lt;br /&gt;
Out of a total of 100 points:&lt;br /&gt;
&lt;br /&gt;
* Basic simulator: 90 points: 10 test cases: We will test your code against 10 cases (9 points per case) without transaction costs.  Points per case are allocated as follows:&lt;br /&gt;
** 2.0: Correct number of days reported in the dataframe (should be the number of trading days between the start date and end date, inclusive).&lt;br /&gt;
** 5.0: Correct portfolio value on the last day +-0.1%&lt;br /&gt;
** 1.0: Correct Sharpe Ratio +-0.1%&lt;br /&gt;
** 1.0: Correct average daily return +-0.1%&lt;br /&gt;
* Transaction costs: 10 points: 5 test cases: We will test your code against 5 cases as follows:&lt;br /&gt;
** 2.0: Two test cases that evaluate commissions only (impact = 0)&lt;br /&gt;
** 2.0: Two test cases that evaluate impact only (commission = 0)&lt;br /&gt;
** 1.0: One test case with non-zero commission and impact.&lt;br /&gt;
&lt;br /&gt;
==Test Cases==&lt;br /&gt;
&lt;br /&gt;
Here are the test cases we used while grading. These are updated each semester, and released after grading.&lt;br /&gt;
&lt;br /&gt;
* [[MC2-Project-1-Test-Cases-spr2016]]&lt;br /&gt;
&lt;br /&gt;
==Required, Allowed &amp;amp; Prohibited==&lt;br /&gt;
&lt;br /&gt;
Required:&lt;br /&gt;
* Your project must be coded in Python 2.7.x.&lt;br /&gt;
* Your code must run on one of the university-provided computers (e.g. buffet02.cc.gatech.edu).&lt;br /&gt;
* When utilizing any of the example orders files code must run in less than 10 seconds on one of the university-provided computers.&lt;br /&gt;
* To read in stock data, use only the functions in util.py, &lt;br /&gt;
&lt;br /&gt;
Allowed:&lt;br /&gt;
* You can develop your code on your personal machine, but it must also run successfully on one of the university provided machines or virtual images.&lt;br /&gt;
* Your code may use standard Python libraries.&lt;br /&gt;
* Unladen African swallows.&lt;br /&gt;
* You may use the NumPy, SciPy, matplotlib and Pandas libraries.  Be sure you are using the correct versions.&lt;br /&gt;
* Code provided by the instructor, or allowed by the instructor to be shared.&lt;br /&gt;
* To read in orders files pandas.read_csv() is allowed.&lt;br /&gt;
&lt;br /&gt;
Prohibited:&lt;br /&gt;
* Global variables.&lt;br /&gt;
* Reading in data by any means other than the functions in util.py or pandas.read_csv()&lt;br /&gt;
* Any libraries or modules not listed in the &amp;quot;allowed&amp;quot; section above.&lt;br /&gt;
* Any code you did not write yourself.&lt;br /&gt;
* Code that takes longer than 10 seconds to run.&lt;br /&gt;
* Any Classes (other than Random) that create their own instance variables for later use (e.g., learners like kdtree).&lt;br /&gt;
&lt;br /&gt;
== FAQs ==&lt;br /&gt;
&lt;br /&gt;
* Q: How can I be sure that my function is returning a DataFrame? Q: Check the type of the returned item foo with &amp;lt;tt&amp;gt;type(foo)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Q: Do we have to reject the order if the stock is not trading on that day?  A: You should fill orders for any day the market is open, and reject orders for any day the market is closed. Suggested operation: Drop days when the market is not open (check by looking at SPY), fill forward, then fill back.&lt;br /&gt;
 &lt;br /&gt;
* Q: Is it true that the orders might not be in order in the csv? A: Yes.&lt;br /&gt;
 &lt;br /&gt;
* Q: Are we supposed to sort the date column after?  A: Yes.&lt;br /&gt;
 &lt;br /&gt;
* Q: If we were to sort, we can assume that multiple orders on the same date won&amp;#039;t have any side-effect if they are executed in random orders?  A: Yes.&lt;br /&gt;
 &lt;br /&gt;
* Q: Should we assume the prices stay the same the whole day?  A: Assume execution prices are adjusted close.&lt;br /&gt;
 &lt;br /&gt;
* Q: So buying any stocks won&amp;#039;t change our portfolio&amp;#039;s value (but selling will), correct?  A: If you mark the value of the portfolio to the market as of close.  Neither buying or selling will affect the value.&lt;br /&gt;
 &lt;br /&gt;
* Q: Do we return portvals daily for the entire periods including weekends, holidays and non-trading days?  A: Only consider trading days. This should happen for you automatically when using get_data() from util.py&lt;br /&gt;
 &lt;br /&gt;
* Q: It seems like my avg_daily_returns and std are off compared to the wiki&amp;#039;s because of this. If not, do we count trading days only for when list of symbols (or SPY) are traded A: Assume the market was open iff SPY was traded.&lt;br /&gt;
&lt;br /&gt;
==Legacy==&lt;br /&gt;
&lt;br /&gt;
* [[Marketsim-2017-Spring]]&lt;br /&gt;
* [[MC2-Project-1]]&lt;br /&gt;
* [[MC2-Project-1-Legacy]]&lt;/div&gt;</summary>
		<author><name>David.joyner</name></author>
		
	</entry>
</feed>