<html><head></head><body data-blackberry-caret-color="#00a8df" style="background-color: rgb(255, 255, 255); line-height: initial;"><div id="BB10_response_div" style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br style="display:initial"></div>                                                                                                                                     <div id="response_div_spacer" style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Hi,</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">could someone point me where the 'quantstrat-l.Rnw' can be found?</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Thanks</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Wasili</div>                                                                                                                                     <div id="_signaturePlaceholder" style="font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"></div>                                                                                                                                                                                        <table width="100%" style="background-color:white;border-spacing:0px;"> <tbody><tr><td id="_persistentHeaderContainer" colspan="2" style="font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);">                                              <div id="_persistentHeader" style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>Von: </b>Mark Knecht</div><div><b>Gesendet: </b>Sonntag, 1. Dezember 2013 15:32</div><div><b>An: </b>GiuseppeL</div><div><b>Cc: </b>r-sig-finance@r-project.org</div><div><b>Betreff: </b>Re: [R-SIG-Finance] quantstrat: "Error in initPortf"</div></div></td></tr></tbody></table><div id="_persistentHeaderEnd" style="border-style: solid none none; border-top-color: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"></div><br><div id="_originalContent" style="">On Sat, Nov 30, 2013 at 10:27 PM, GiuseppeL <borsaric@gmail.com> wrote:<br>> Hi,I am studing Guy Yolin's examples (quantstrat-I.Rnw) and I wonder<br>> if someone can help me with this error message "<br>><br>> Error in initPortf("buyHold", "SPY", initDate = "1997-12-31") :<br>>   Portfolio buyHold already exists, use updatePortf() or<br>> addPortfInstr() to update it.In addition: There were 50 or more<br>> warnings (use warnings() to see the first 50)"<br>><br>> Thanks.<br>><br><br><br>Accounts and portfolios are by default stored in .blotter. Once the<br>code is run once the accounts exist and don't need to be created<br>again.<br><br>ls(.blotter)<br><br>You can break the examples into two pieces, one you run once to set<br>things up and a second one you run when you want to do work. Or, you<br>can consider adding something like<br><br>suppressWarnings(rm("account.ETF_Momentum", pos = .blotter))<br>suppressWarnings(rm("portfolio.Equity", pos = .blotter))<br>suppressWarnings(rm("portfolio.Cash", pos = .blotter))<br><br>but of course change the names to match what you (or Guy) used.<br><br>HTH,<br>Mark<br><br>_______________________________________________<br>R-SIG-Finance@r-project.org mailing list<br>https://stat.ethz.ch/mailman/listinfo/r-sig-finance<br>-- Subscriber-posting only. If you want to post, subscribe first.<br>-- Also note that this is not the r-help list where general R questions should go.<br></div></body></html>