<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-5815834906618132494.post8332842223445511674..comments</id><updated>2011-11-10T22:33:59.207-06:00</updated><category term='xts'/><category term='Code'/><category term='Interactive Brokers'/><category term='Drawdown'/><category term='LSPM'/><category term='quantmod'/><category term='Data'/><category term='Releases'/><category term='HIstorical Data'/><category term='blotter'/><category term='quantstrat'/><category term='Events'/><category term='TTR'/><category term='API'/><category term='IBrokers'/><category term='Examples'/><category term='R'/><category term='Excel'/><title type='text'>Comments on FOSS Trading: Tactical asset allocation using blotter</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.fosstrading.com/feeds/8332842223445511674/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default?start-index=26&amp;max-results=25'/><author><name>Joshua Ulrich</name><uri>https://profiles.google.com/101580259945483587604</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-cNBfNQ-0tKE/AAAAAAAAAAI/AAAAAAAAAAA/QxKaQjp1h4M/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-6419868473343333834</id><published>2011-11-10T22:33:59.207-06:00</published><updated>2011-11-10T22:33:59.207-06:00</updated><title type='text'>Thanks a lot for the clarifications Brian!</title><content type='html'>Thanks a lot for the clarifications Brian!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6419868473343333834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6419868473343333834'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1320986039207#c6419868473343333834' title=''/><author><name>segaa</name><uri>http://www.blogger.com/profile/04233325205386980154</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-674785996'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-5687267418934830245</id><published>2011-11-08T21:00:59.481-06:00</published><updated>2011-11-08T21:00:59.481-06:00</updated><title type='text'>The script itself says: 

&amp;quot;NOTE: For the purp...</title><content type='html'>The script itself says: &lt;br /&gt;&lt;br /&gt;&amp;quot;NOTE: For the purposes of this demo, we ignore interest and leverage.&amp;quot;&lt;br /&gt;&lt;br /&gt;It doe *not* say &amp;quot;for the purposes of this demo, we use no leverage&amp;quot;.&lt;br /&gt;&lt;br /&gt;In basically all institutional accounts and in many retail accounts, open equity is essentially equivalent to cash, and it would be fine to use the ending equity, including any open equity, to decide on the sizing of any new positions.&lt;br /&gt;&lt;br /&gt;In any event, patches are always welcome to extract available cash and use that instead (ending equity minus position values in a long-only portfolio, as I recall).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5687267418934830245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5687267418934830245'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1320807659481#c5687267418934830245' title=''/><author><name>Brian G. Peterson</name><uri>http://www.blogger.com/profile/09226525229201110236</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-O7N5uLSKXBo/Tj_yRJWnc3I/AAAAAAAAADA/ehZB5dF9MlQ/s220/Brian_prof_image.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-61989198'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-7090214954452666194</id><published>2011-11-08T19:33:22.468-06:00</published><updated>2011-11-08T19:33:22.468-06:00</updated><title type='text'>Joshua, thanks a lot for your reply! My results ar...</title><content type='html'>Joshua, thanks a lot for your reply! My results are 100% reproducible to me. The code is similar to yours, I&amp;#39;ve just added the following 3 lines at the top, before loading the libraries, to make the code independent of the workspace:&lt;br /&gt;rm(list=ls(all=TRUE))&lt;br /&gt;if(!exists(&amp;#39;.instrument&amp;#39;)) .instrument &amp;lt;&amp;lt;- new.env(hash=TRUE)&lt;br /&gt;if(!exists(&amp;#39;.blotter&amp;#39;)) .blotter &amp;lt;&amp;lt;- new.env(hash=TRUE)&lt;br /&gt;As verbose = TRUE I can see the results of the strategy allocations in the console output, I&amp;#39;ve just ran it again and got the following:&lt;br /&gt;... SKIP ...&lt;br /&gt;+ } # End dates loop&lt;br /&gt;[1] &amp;quot;2003-04-30 IEF 578 @ 86.39&amp;quot;&lt;br /&gt;[1] &amp;quot;2003-04-30 SPY 544 @ 91.91&amp;quot;&lt;br /&gt;[1] &amp;quot;2003-07-31 IEF -578 @ 83.38&amp;quot;&lt;br /&gt;[1] &amp;quot;2003-09-30 IEF 597 @ 86.59&amp;quot;&lt;br /&gt;[1] &amp;quot;2003-10-31 IEF -597 @ 84.6&amp;quot;&lt;br /&gt;[1] &amp;quot;2004-02-27 IEF 627 @ 86.68&amp;quot;&lt;br /&gt;[1] &amp;quot;2004-04-30 IEF -627 @ 83.5&amp;quot;&lt;br /&gt;... SKIP ...&lt;br /&gt;The generated PNG images are absolutely the same as in your post.&lt;br /&gt;If I understand correctly:&lt;br /&gt;1.  we&amp;#39;ve bought 578 shares of IEF on 2003-04-30 at $86.39 that leaves $50066.58 at our account unused.&lt;br /&gt;2.  than we&amp;#39;ve bot 544 shares of SPY at $91.91 that leaves us with $67.54 on account&lt;br /&gt;3.  on 2003—07-31 we&amp;#39;ve closed our IEF position with loss at $83.38 that leaves $48261.18 at our account&lt;br /&gt;4.  next, we are buying 597 shares of IEF at $86.59 that leaves us with minus $3433.05 etc.&lt;br /&gt;&lt;br /&gt;Maybe I&amp;#39;m misunderstanding something, please clarify. Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/7090214954452666194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/7090214954452666194'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1320802402468#c7090214954452666194' title=''/><author><name>segaa</name><uri>http://www.blogger.com/profile/04233325205386980154</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-674785996'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-6715631299499307280</id><published>2011-11-01T20:45:13.735-05:00</published><updated>2011-11-01T20:45:13.735-05:00</updated><title type='text'>seega,

I don&amp;#39;t where you&amp;#39;re getting those...</title><content type='html'>seega,&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t where you&amp;#39;re getting those numbers.  I just ran the script myself and cannot replicate what you&amp;#39;ve shown in your comment.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6715631299499307280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6715631299499307280'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1320198313735#c6715631299499307280' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-5389226099862776006</id><published>2011-10-31T20:49:23.914-05:00</published><updated>2011-10-31T20:49:23.914-05:00</updated><title type='text'>Thanks for the nice example, but there&amp;#39;s diffe...</title><content type='html'>Thanks for the nice example, but there&amp;#39;s differently an error in the calculations of return for tactical strategy, as an example here are several lines of results that I&amp;#39;ve got from the strategy:&lt;br /&gt;Date Symbol Size Price Change Total&lt;br /&gt;0 0 0 0 0  100000&lt;br /&gt;4/30/2003 IEF 578 86.39 49933.42 50066.58&lt;br /&gt;4/30/2003 SPY 544 91.91 49999.04 67.54&lt;br /&gt;7/31/2003 IEF -578 83.38 -48193.6 48261.18&lt;br /&gt;9/30/2003 IEF 597 86.59 51694.23 -3433.05&lt;br /&gt;10/31/2003 IEF -597 84.6 -50506.2 47073.15&lt;br /&gt;&lt;br /&gt;When second position opened in IEF on 9/30/2003 there&amp;#39;s -3422.05 left at the account that suppose to never go below 0. I understand that we can borrow money on margin, but this is not the case for the strategy, and I see several instances in the results when buy made on margin. Probably because of that at the end of the last term the return if calculated manually is more like 17%, and not 22.7% as per the script result.&lt;br /&gt;Sorry, maybe I&amp;#39;m missing something, please point it if so. FYI, I&amp;#39;m using R version 2.13.2&lt;br /&gt;Thanks again for the great job!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5389226099862776006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5389226099862776006'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1320112163914#c5389226099862776006' title=''/><author><name>segaa</name><uri>http://www.blogger.com/profile/04233325205386980154</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-674785996'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-4302059247547550188</id><published>2011-09-25T12:28:55.475-05:00</published><updated>2011-09-25T12:28:55.475-05:00</updated><title type='text'>Hasan and Elihu,

Sorry for the extremely slow rep...</title><content type='html'>Hasan and Elihu,&lt;br /&gt;&lt;br /&gt;Sorry for the extremely slow reply.  I&amp;#39;ve corrected the code to work with more recent versions of blotter.  Also see the update at the top of the post.&lt;br /&gt;&lt;br /&gt;Best,&lt;br /&gt;Josh</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/4302059247547550188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/4302059247547550188'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1316971735475#c4302059247547550188' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-6562138541851737657</id><published>2011-08-31T00:04:00.295-05:00</published><updated>2011-08-31T00:04:00.295-05:00</updated><title type='text'>Second on Hasan&amp;#39;s error - the whole script run...</title><content type='html'>Second on Hasan&amp;#39;s error - the whole script runs up until: &lt;br /&gt;&lt;br /&gt;&amp;quot;charts.PerformanceSummary(ROC(getAccount(&amp;#39;default&amp;#39;)$TOTAL$End.Eq)[-1],main=&amp;quot;Tactical Asset Allocation&amp;quot;)&lt;br /&gt;&lt;br /&gt;Then R throws &amp;quot;Error in dim(data) &amp;lt;- dim : attempt to set an attribute on NULL.&amp;quot;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m running R 2.13.1 (installed today) in RStudio, and I just ran the update.packages() script mentioned above.&lt;br /&gt;&lt;br /&gt;Thanks Josh for the great tutorial!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6562138541851737657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6562138541851737657'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1314767040295#c6562138541851737657' title=''/><author><name>Elihu</name><uri>http://www.blogger.com/profile/01969924423785517132</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/8103/1623/1600/Image001.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-834208130'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-865776639692651416</id><published>2011-04-15T17:37:15.162-05:00</published><updated>2011-04-15T17:37:15.162-05:00</updated><title type='text'>Ok, I can get the returns and see the actual data ...</title><content type='html'>Ok, I can get the returns and see the actual data structures. But the code crashes at the first chartSeries line. So, I tried looking at getAccount(&amp;#39;default&amp;#39;), which looks like: &lt;br /&gt;&lt;br /&gt;# from head(getAccount(&amp;#39;default&amp;#39;))&lt;br /&gt;$portfolios&lt;br /&gt;$portfolios$default&lt;br /&gt;           Long.Value Short.Value Net.Value Gross.Value Realized.PL&lt;br /&gt;2002-07-31        0.0           0       0.0         0.0        0.00&lt;br /&gt;2003-04-30   199951.3           0  199951.3    199951.3        0.00&lt;br /&gt;2003-05-30   208813.3           0  208813.3    208813.3        0.00&lt;br /&gt;2003-06-30   208558.1           0  208558.1    208558.1        0.00&lt;br /&gt;2003-07-31   108136.3           0  108136.3    108136.3    -3482.57&lt;br /&gt;2003-08-29   110366.7           0  110366.7    110366.7        0.00&lt;br /&gt;2003-09-30   212134.1           0  212134.1    212134.1        0.00&lt;br /&gt;2003-10-31   114566.4           0  114566.4    114566.4    -2376.06&lt;br /&gt;2003-11-28   115817.6           0  115817.6    115817.6        0.00&lt;br /&gt;2003-12-31   121072.6           0  121072.6    121072.6        0.00&lt;br /&gt;2004-01-30   123466.2           0  123466.2    123466.2        0.00&lt;br /&gt;2004-02-27   233925.2           0  233925.2    233925.2        0.00&lt;br /&gt;2004-03-31   232928.0           0  232928.0    232928.0        0.00&lt;br /&gt;2004-04-30   120724.5           0  120724.5    120724.5    -3990.90&lt;br /&gt;2004-05-28   122791.7           0  122791.7    122791.7        0.00&lt;br /&gt;2004-06-30   124608.6           0  124608.6    124608.6        0.00&lt;br /&gt;2004-07-30        0.0           0       0.0         0.0    20595.84&lt;br /&gt;2004-08-31   105362.5           0  105362.5    105362.5        0.00&lt;br /&gt;2004-09-30   105374.8           0  105374.8    105374.8        0.00&lt;br /&gt;2004-10-29   211374.7           0  211374.7    211374.7        0.00</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/865776639692651416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/865776639692651416'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1302907035162#c865776639692651416' title=''/><author><name>Hasan</name><uri>http://www.blogger.com/profile/09631681950518688098</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1835666015'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-5131585924000261447</id><published>2010-11-06T18:25:28.032-05:00</published><updated>2010-11-06T18:25:28.032-05:00</updated><title type='text'>Works fine on my linux slice but I noticed install...</title><content type='html'>Works fine on my linux slice but I noticed install blotter is blowing up on my mac. - https://r-forge.r-project.org/R/?group_id=316&amp;amp;log=build_mac&amp;amp;pkg=FinancialInstrument&amp;amp;flavor=patched&lt;br /&gt;&lt;br /&gt;Just wanted to throw out a heads up.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5131585924000261447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5131585924000261447'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1289085928032#c5131585924000261447' title=''/><author><name>Florian</name><uri>http://www.blogger.com/profile/14106507531967201905</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1591930693'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-2702447276764091343</id><published>2010-10-11T11:29:12.396-05:00</published><updated>2010-10-11T11:29:12.396-05:00</updated><title type='text'>SWAustinGuy,

I&amp;#39;ve spoken with Brian and we be...</title><content type='html'>SWAustinGuy,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve spoken with Brian and we believe the error is in r411 of blotter and has been fixed in r412.  But you didn&amp;#39;t get the fix because the Windows binary of r412 has not been built on R-forge yet.  Please try again once you see &amp;quot;Rev: 412&amp;quot; for blotter on &lt;a href="https://r-forge.r-project.org/R/?group_id=316" rel="nofollow"&gt;this page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Sorry for the trouble.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/2702447276764091343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/2702447276764091343'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1286814552396#c2702447276764091343' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-2769045666760293085</id><published>2010-10-10T19:51:46.854-05:00</published><updated>2010-10-10T19:51:46.854-05:00</updated><title type='text'>Hmm, if I change the following line in updatePortf...</title><content type='html'>Hmm, if I change the following line in updatePortf (Dates=..., the code runs much further, executing a few hundred trades, then failing.&lt;br /&gt;&lt;br /&gt;old:&lt;br /&gt;updatePortf(ltportfolio, Dates = CurrentDate)&lt;br /&gt;&lt;br /&gt;new:&lt;br /&gt;updatePortf(Portfolio=&amp;#39;default&amp;#39;, Dates=paste(&amp;#39;::&amp;#39;,as.Date(Sys.time()),sep=&amp;#39;&amp;#39;))&lt;br /&gt;&lt;br /&gt;Then fails with:&lt;br /&gt;[1] &amp;quot;2007-05-31 IEF -611 @ 91.45&amp;quot;&lt;br /&gt;Error in `[.xts`(sym, i, ) : subscript out of bounds&lt;br /&gt;&lt;br /&gt;Is the date thing an issue in Windows?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/2769045666760293085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/2769045666760293085'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1286758306854#c2769045666760293085' title=''/><author><name>SWAustinGuy</name><uri>http://www.blogger.com/profile/02863487227658028225</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-40629627'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-9174083313220038075</id><published>2010-10-10T18:56:54.137-05:00</published><updated>2010-10-10T18:56:54.137-05:00</updated><title type='text'>Hi -
I could use some help in getting the example ...</title><content type='html'>Hi -&lt;br /&gt;I could use some help in getting the example &amp;#39;longtrend&amp;#39; working in R-2.11.1, and the latest blotter, xts, quantmod, from R-forge (just updated all packages today).&lt;br /&gt;&lt;br /&gt;I&amp;#39;m running Win7 (but don&amp;#39;t have to if it&amp;#39;s an issue).  The problem I am having is in updatePortf()&lt;br /&gt;I get the following error&lt;br /&gt;&lt;br /&gt;[1] &amp;quot;2001-04-30 IEF 578 @ 86.39&amp;quot;&lt;br /&gt;Symbol IEF Date: 988588800 TxnPrice 86.39 Qty 578 &lt;br /&gt;Here&lt;br /&gt;&lt;br /&gt;Error in if (ncol(Prices) &amp;gt; 1) Prices = getPrice(prices, Symbol)[dateRange] : &lt;br /&gt;  argument is of length zero&lt;br /&gt;&lt;br /&gt;It appears as if everything is working correctly except for the update to the portfolio.  I&amp;#39;ve dumped my enironment, version info, code I am running (from example), error message, data frame for underlying symbol IEF, and the error I get when trying to manually add a transaction and update portfolio on the command line of &amp;#39;R&amp;#39;.&lt;br /&gt; &lt;br /&gt;http://oeo.la/T2zHyC&lt;br /&gt;&lt;br /&gt;I&amp;#39;m very new to &amp;#39;R&amp;#39;, so I hope to have captured all relevant information and thank anyone in advance that might be able to steer me in the right direction.&lt;br /&gt;&lt;br /&gt;Great blog - Thanks allot for sharing this.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/9174083313220038075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/9174083313220038075'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1286755014137#c9174083313220038075' title=''/><author><name>SWAustinGuy</name><uri>http://www.blogger.com/profile/02863487227658028225</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-40629627'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-5801481828251995552</id><published>2010-08-16T19:25:07.661-05:00</published><updated>2010-08-16T19:25:07.661-05:00</updated><title type='text'>Another alternative for cleaning up the environmen...</title><content type='html'>Another alternative for cleaning up the environment would be:&lt;br /&gt;rm(list=ls(all=TRUE, pos=.blotter), pos=.blotter)&lt;br /&gt;rm(list=ls(all=TRUE, pos=.instrument), pos=.instrument)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5801481828251995552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5801481828251995552'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1282004707661#c5801481828251995552' title=''/><author><name>benmccann</name><uri>http://www.blogger.com/profile/17087416729361204935</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1774837294'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-5112156255963703461</id><published>2010-07-31T15:33:02.950-05:00</published><updated>2010-07-31T15:33:02.950-05:00</updated><title type='text'>Zachary,
I have the same problem.  I can run the s...</title><content type='html'>Zachary,&lt;br /&gt;I have the same problem.  I can run the script once, but it fails on subsequent attempts because the portfolio already exists.  One way I found to remedy the issue is to cleanup the workspace.&lt;br /&gt;&lt;br /&gt;# Reset the workspace by deleting all variables and recreating&lt;br /&gt;# the environment variables created during library load&lt;br /&gt;rm(list=ls(all=TRUE))&lt;br /&gt;.blotter &amp;lt;- new.env()&lt;br /&gt;.instrument &amp;lt;- new.env()&lt;br /&gt;&lt;br /&gt;-Ben&lt;br /&gt;benmccann.com</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5112156255963703461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5112156255963703461'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1280608382950#c5112156255963703461' title=''/><author><name>benmccann</name><uri>http://www.blogger.com/profile/17087416729361204935</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1774837294'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-8593520719400919633</id><published>2010-06-10T12:01:52.327-05:00</published><updated>2010-06-10T12:01:52.327-05:00</updated><title type='text'>Thanks Josh, I got it to work.  There was an odd m...</title><content type='html'>Thanks Josh, I got it to work.  There was an odd masking going on I was able to clear out.  It works beautifully.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/8593520719400919633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/8593520719400919633'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1276189312327#c8593520719400919633' title=''/><author><name>G$</name><uri>http://www.blogger.com/profile/01349972242888715865</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2041577014'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-1904743007092426511</id><published>2010-06-04T13:21:19.077-05:00</published><updated>2010-06-04T13:21:19.077-05:00</updated><title type='text'>G$,

quantmod:::getPrice is in the most recent Mac...</title><content type='html'>G$,&lt;br /&gt;&lt;br /&gt;quantmod:::getPrice is in the most recent MacOS X binary of quantmod on R-forge (I just looked).  I have no idea what you could be doing wrong.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/1904743007092426511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/1904743007092426511'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1275675679077#c1904743007092426511' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-7436001037648834670</id><published>2010-05-10T08:10:47.726-05:00</published><updated>2010-05-10T08:10:47.726-05:00</updated><title type='text'>getPrice isn&amp;#39;t exported, which is why you can&amp;...</title><content type='html'>getPrice isn&amp;#39;t exported, which is why you can&amp;#39;t find it via the methods you tried.  It&amp;#39;s in the source file Price.transformations.R (functions do not need to be in a file of the same name).&lt;br /&gt;&lt;br /&gt;quantmod:::getPrice will show you the source code from the R console.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/7436001037648834670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/7436001037648834670'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1273497047726#c7436001037648834670' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-3260935443154446326</id><published>2010-05-09T23:17:37.872-05:00</published><updated>2010-05-09T23:17:37.872-05:00</updated><title type='text'>Sorry, I did download the latest off r-forge, vers...</title><content type='html'>Sorry, I did download the latest off r-forge, version 03.03-14.&lt;br /&gt;&lt;br /&gt;I loaded the package, library(quantmod)&lt;br /&gt;&lt;br /&gt;I can&amp;#39;t find any getPrice.R in the R directory, neither can I use help(getPrice) to find any documentation for it to pull from the man directory.  I do see a getQuote?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/3260935443154446326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/3260935443154446326'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1273465057872#c3260935443154446326' title=''/><author><name>G$</name><uri>http://www.blogger.com/profile/01349972242888715865</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2041577014'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-1520795744051378280</id><published>2010-05-09T22:03:42.652-05:00</published><updated>2010-05-09T22:03:42.652-05:00</updated><title type='text'>G$,

getPrice is in quantmod.  Run update.packages...</title><content type='html'>G$,&lt;br /&gt;&lt;br /&gt;getPrice is in quantmod.  Run update.packages().  If that doesn&amp;#39;t work, get the most recent version of quantmod from R-forge.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/1520795744051378280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/1520795744051378280'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1273460622652#c1520795744051378280' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-831733595353284908</id><published>2010-05-09T22:00:17.156-05:00</published><updated>2010-05-09T22:00:17.156-05:00</updated><title type='text'>Josh, I just downloaded the latest MacOS X Leopard...</title><content type='html'>Josh, I just downloaded the latest MacOS X Leopard binary for blotter and am trying to follow the example so I can use the package with my Fixed Income Calendar Effects strategy, but I am getting some environment errors such as:&lt;br /&gt;&lt;br /&gt;Error in updatePosPL(Portfolio = pname, Symbol = as.character(symbol),  : &lt;br /&gt;  could not find function &amp;quot;getPrice&amp;quot;&lt;br /&gt;&lt;br /&gt;Am I missing an installed package, or do I have to do something to expose the getPrice function?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/831733595353284908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/831733595353284908'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1273460417156#c831733595353284908' title=''/><author><name>G$</name><uri>http://www.blogger.com/profile/01349972242888715865</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2041577014'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-6655502275059596621</id><published>2010-04-29T10:26:36.743-05:00</published><updated>2010-04-29T10:26:36.743-05:00</updated><title type='text'>Trey,

Yes, that will work until I can fix the adj...</title><content type='html'>Trey,&lt;br /&gt;&lt;br /&gt;Yes, that will work until I can fix the adjustment algorithm.  Accuracy is only an issue for securities with many splits and/or dividends over an extended period of time.&lt;br /&gt;&lt;br /&gt;You&amp;#39;re correct that &lt;i&gt;code&lt;/i&gt; couldn&amp;#39;t be executed in real-time.  That said, this strategy trades very infrequently and you would generally know well ahead of time whether the month-end close would be above/below the SMA, so you &lt;i&gt;could&lt;/i&gt; enter the trades at the month-end close.  Your observation is &lt;i&gt;very&lt;/i&gt; important at higher frequencies, however.&lt;br /&gt;&lt;br /&gt;The R/Finance 2010 presentations should be on the website in a few weeks.  I&amp;#39;ll post when they&amp;#39;re available.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6655502275059596621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/6655502275059596621'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1272554796743#c6655502275059596621' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-5501407016411294115</id><published>2010-04-29T10:12:15.823-05:00</published><updated>2010-04-29T10:12:15.823-05:00</updated><title type='text'>Josh,
  I changed the code to the following: IEF =...</title><content type='html'>Josh,&lt;br /&gt;  I changed the code to the following: IEF = adjustOHLC(IEF, use.Adjusted=TRUE) and I did the same for SPY. Everything worked fine. The documentation does state that this method is less accurate.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;As is, this system isn&amp;#39;t tradable. I&amp;#39;m not sure if you intended that or not. In my opinion, it&amp;#39;s important to make sure that a back-test is actually tradable, in the sense that it could actually be executed in real time. The rule is &amp;quot;If Close &amp;gt; SMA buy on close&amp;quot;. The values are determined after the market has closed which requires you buy at the next bar, not that bar close. In this example, that would be the open of the following month. It seems that we would need to switch to daily for the entry. I&amp;#39;ll see what I can do. Thanks again for the code and I hope this helps.&lt;br /&gt;&lt;br /&gt;Are the presentations from R/Fin 2010 going to posted with prior years?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5501407016411294115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/5501407016411294115'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1272553935823#c5501407016411294115' title=''/><author><name>trey</name><uri>http://www.blogger.com/profile/10432286752304075125</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-936827192'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-8610528795060148914</id><published>2010-04-13T21:57:41.262-05:00</published><updated>2010-04-13T21:57:41.262-05:00</updated><title type='text'>Trey,

Thanks for the information.  It looks like ...</title><content type='html'>Trey,&lt;br /&gt;&lt;br /&gt;Thanks for the information.  It looks like something changed in merge.xts that is affecting the adjustment algorithm.  I&amp;#39;m busy preparing for, and attending, &lt;a href="http://www.rinfinance.com/" rel="nofollow"&gt;R/Finance 2010&lt;/a&gt;, so I won&amp;#39;t be able to dig into this further until next week.  Thanks for the report.&lt;br /&gt;&lt;br /&gt;Best,&lt;br /&gt;Josh</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/8610528795060148914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/8610528795060148914'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1271213861262#c8610528795060148914' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-1667283306385302484</id><published>2010-04-13T20:32:45.967-05:00</published><updated>2010-04-13T20:32:45.967-05:00</updated><title type='text'>Josh,
 Thanks for posting the example. I&amp;#39;ve be...</title><content type='html'>Josh,&lt;br /&gt; Thanks for posting the example. I&amp;#39;ve been working with this example and ran into the same error as judsonm123. It appears that IEF = adjustOHLC(IEF) results in NAs for the OHLC columns which then creates an error in to.monthly and SMA calculations. I&amp;#39;m running R 2.10.1 with the latest required libraries. I&amp;#39;m still trying to figure it out but I thought I&amp;#39;d let you know.&lt;br /&gt;&lt;br /&gt;Best Regards,&lt;br /&gt;Trey</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/1667283306385302484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/1667283306385302484'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1271208765967#c1667283306385302484' title=''/><author><name>trey</name><uri>http://www.blogger.com/profile/10432286752304075125</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-936827192'/></entry><entry><id>tag:blogger.com,1999:blog-5815834906618132494.post-9028466040530072951</id><published>2010-03-07T15:44:24.778-06:00</published><updated>2010-03-07T15:44:24.778-06:00</updated><title type='text'>Nim,

Sorry, it was a bug in the code caused by so...</title><content type='html'>Nim,&lt;br /&gt;&lt;br /&gt;Sorry, it was a bug in the code caused by some recent updates to blotter on R-forge.  The example works now.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/9028466040530072951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5815834906618132494/8332842223445511674/comments/default/9028466040530072951'/><link rel='alternate' type='text/html' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html?showComment=1267998264778#c9028466040530072951' title=''/><author><name>Joshua Ulrich</name><uri>http://www.blogger.com/profile/16641971932645230429</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.fosstrading.com/2009/11/tactical-asset-allocation-using-blotter.html' ref='tag:blogger.com,1999:blog-5815834906618132494.post-8332842223445511674' source='http://www.blogger.com/feeds/5815834906618132494/posts/default/8332842223445511674' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1996417509'/></entry></feed>
