Re: [R] newbie question: strategy
thanks for the heads up, I am checking all my providers EULAs to see which one I can share online... I imagine that as long as it is delayed 24 hours, there might be no issues... we will see... either way, worst case, I lost $9 for a registration... best case... I can share most ETF's with the community. On Sun, Apr 8, 2012 at 3:02 AM, R. Michael Weylandt wrote: > Just a heads up: I'm pretty sure Josh and the other QS developers have > access to intra-day data, but they can't provide an example using it > in the package because the EULAs of most data providers won't allow > direct redistribution of their data. The examples included all go > online and download data from a free source, but they don't provide it > directly because even the "free" providers like Yahoo don't allow > that. [There's a whole beer vs speech thing at play here] > > If you do put truly free intraday numbers online, you'll be doing a > big service to the community, but make sure it's legal before you > start. You'll also note that the older packages in the > quant(mod|strat) universe like TTR don't use real data for their > examples: rather they use simulated data to avoid all such issues. > > I imagine full quanstrat documentation will appear in time, but it's > still under (very) active development so the mailing list archive > examples are the best currently available. Once the system and the API > are finalized, then it will make sense to document them. > > Hope this helps, > Michael > > On Sat, Apr 7, 2012 at 10:15 PM, sysot1t wrote: >> yes, I would have expected documented samples for something simple.. as I >> said, I am not asking for anything complex but something rather simple that >> I can use to learn from and build upon.. not a highly complex example that >> provides me with little explanation of what is going on... quanstrat is >> great, and it simplifies things, but hard to use if it is not clearly and >> extensively documented.. the demos are good, but again... one line >> describing what a block of 5-10 lines do.. that drives one to look into what >> the functions are actually doing and it can drive one nuts... just my 2 >> cents given I believe you are one of the experts on qstrat... >> >> with regard to intraday... I didn't realize that most people dont have >> access to intraday sources for data... I figure if you are using R for quant >> work, then you have access to RT data... btw, I am not a quant, I am an IT >> architect who trades his own retirement account... in any event, I will >> create a website and publish csv's for any universe of instruments and >> markets... for free ... in the same spirit of opensource that R was written >> on ... I just registered quantstrat-rt.com... both minute and tick data will >> be posted.. for all to use for analysis.. with the obvious disclaimers about >> the data of course. >> >> lastly, I dont mind putting in the time and effort to learn something, as >> long as proper and adequate learning resources are available... a few hours >> ago I ordered more books about R from springer this time... all those books >> are great to learn R itself, but useless to learn all the custom modules >> that are out there... quantmod has good docs, so does timesac and >> performanceanalytics... and one can go line by line (as I have done today) >> to see what all the samples do and how they are altering the information... >> but nothing formalized for learning to leverage them, just trial and error >> (which can be frustrating) >> >> I didnt ask for anyone to do my work for me, but rather I expected anyone >> that had done something similar to share what they had done so that I could >> learn from it... simple and straight forward... >> >> anyhow, feel free to send me a pm with your email contact information and I >> will reach out ... your reply is much appreciated. >> >> >> -- >> View this message in context: >> http://r.789695.n4.nabble.com/newbie-question-strategy-tp4538818p4540381.html >> Sent from the R help mailing list archive at Nabble.com. >> >> __ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] newbie question: strategy
Just a heads up: I'm pretty sure Josh and the other QS developers have access to intra-day data, but they can't provide an example using it in the package because the EULAs of most data providers won't allow direct redistribution of their data. The examples included all go online and download data from a free source, but they don't provide it directly because even the "free" providers like Yahoo don't allow that. [There's a whole beer vs speech thing at play here] If you do put truly free intraday numbers online, you'll be doing a big service to the community, but make sure it's legal before you start. You'll also note that the older packages in the quant(mod|strat) universe like TTR don't use real data for their examples: rather they use simulated data to avoid all such issues. I imagine full quanstrat documentation will appear in time, but it's still under (very) active development so the mailing list archive examples are the best currently available. Once the system and the API are finalized, then it will make sense to document them. Hope this helps, Michael On Sat, Apr 7, 2012 at 10:15 PM, sysot1t wrote: > yes, I would have expected documented samples for something simple.. as I > said, I am not asking for anything complex but something rather simple that > I can use to learn from and build upon.. not a highly complex example that > provides me with little explanation of what is going on... quanstrat is > great, and it simplifies things, but hard to use if it is not clearly and > extensively documented.. the demos are good, but again... one line > describing what a block of 5-10 lines do.. that drives one to look into what > the functions are actually doing and it can drive one nuts... just my 2 > cents given I believe you are one of the experts on qstrat... > > with regard to intraday... I didn't realize that most people dont have > access to intraday sources for data... I figure if you are using R for quant > work, then you have access to RT data... btw, I am not a quant, I am an IT > architect who trades his own retirement account... in any event, I will > create a website and publish csv's for any universe of instruments and > markets... for free ... in the same spirit of opensource that R was written > on ... I just registered quantstrat-rt.com... both minute and tick data will > be posted.. for all to use for analysis.. with the obvious disclaimers about > the data of course. > > lastly, I dont mind putting in the time and effort to learn something, as > long as proper and adequate learning resources are available... a few hours > ago I ordered more books about R from springer this time... all those books > are great to learn R itself, but useless to learn all the custom modules > that are out there... quantmod has good docs, so does timesac and > performanceanalytics... and one can go line by line (as I have done today) > to see what all the samples do and how they are altering the information... > but nothing formalized for learning to leverage them, just trial and error > (which can be frustrating) > > I didnt ask for anyone to do my work for me, but rather I expected anyone > that had done something similar to share what they had done so that I could > learn from it... simple and straight forward... > > anyhow, feel free to send me a pm with your email contact information and I > will reach out ... your reply is much appreciated. > > > -- > View this message in context: > http://r.789695.n4.nabble.com/newbie-question-strategy-tp4538818p4540381.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] newbie question: strategy
yes, I would have expected documented samples for something simple.. as I said, I am not asking for anything complex but something rather simple that I can use to learn from and build upon.. not a highly complex example that provides me with little explanation of what is going on... quanstrat is great, and it simplifies things, but hard to use if it is not clearly and extensively documented.. the demos are good, but again... one line describing what a block of 5-10 lines do.. that drives one to look into what the functions are actually doing and it can drive one nuts... just my 2 cents given I believe you are one of the experts on qstrat... with regard to intraday... I didn't realize that most people dont have access to intraday sources for data... I figure if you are using R for quant work, then you have access to RT data... btw, I am not a quant, I am an IT architect who trades his own retirement account... in any event, I will create a website and publish csv's for any universe of instruments and markets... for free ... in the same spirit of opensource that R was written on ... I just registered quantstrat-rt.com... both minute and tick data will be posted.. for all to use for analysis.. with the obvious disclaimers about the data of course. lastly, I dont mind putting in the time and effort to learn something, as long as proper and adequate learning resources are available... a few hours ago I ordered more books about R from springer this time... all those books are great to learn R itself, but useless to learn all the custom modules that are out there... quantmod has good docs, so does timesac and performanceanalytics... and one can go line by line (as I have done today) to see what all the samples do and how they are altering the information... but nothing formalized for learning to leverage them, just trial and error (which can be frustrating) I didnt ask for anyone to do my work for me, but rather I expected anyone that had done something similar to share what they had done so that I could learn from it... simple and straight forward... anyhow, feel free to send me a pm with your email contact information and I will reach out ... your reply is much appreciated. -- View this message in context: http://r.789695.n4.nabble.com/newbie-question-strategy-tp4538818p4540381.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] newbie question: strategy
On Apr 7, 2012 7:55 PM, "sysot1t" wrote: > > I am not asking anyone to deliver anything, to the best of my understanding You asked for documented code examples of the items you listed in your original email. > all that I requested in terms of functionality is more than likely done in > quantstrat as you point out. Issues is: quantstrat has extremely poor > documentation. Yes, there are "samples", but they are certainly not simple > and they are more focused on daily data, vs. intraday... note that I don't If you can provide a free, public source of intraday data, we can entertain the idea of including intraday examples. > mention high frequency given that I am not interested on bringing tick data > into R, but rather simple minute bars... yes, I can always aggregate tick > and create the minutes from it.. but I would assume that I am not the only > one using intraday(minute bars) and that someone has already done it... > btw, the archives are littered with requests for information, met with > answers similar to yours pointing to the documentation... I guess one has to > figure things out oneself or approach an actual expert on R to request Actual R experts often monitor these lists. You get what you pay for. I'm surprised you're surprised that people who provide free support for free software don't do more work for you. > assistance... oh well... thanks for all the replies and the prompt > assistance. > > I would be happy to help you with your project at my regular consulting rate. Best, -- Joshua Ulrich | FOSS Trading: www.fosstrading.com R/Finance 2012: Applied Finance with R www.RinFinance.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] newbie question: strategy
I am not asking anyone to deliver anything, to the best of my understanding all that I requested in terms of functionality is more than likely done in quantstrat as you point out. Issues is: quantstrat has extremely poor documentation. Yes, there are "samples", but they are certainly not simple and they are more focused on daily data, vs. intraday... note that I dont mention high frequency given that I am not interested on bringing tick data into R, but rather simple minute bars... yes, I can always aggregate tick and create the minutes from it.. but I would assume that I am not the only one using intraday(minute bars) and that someone has already done it... btw, the archives are littered with requests for information, met with answers similar to yours pointing to the documentation... I guess one has to figure things out oneself or approach an actual expert on R to request assistance... oh well... thanks for all the replies and the prompt assistance. -- View this message in context: http://r.789695.n4.nabble.com/newbie-question-strategy-tp4538818p4540267.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] newbie question: strategy
So you want us to deliver an entire backtesting architecture for you? That's a pretty hefty request... But being R, it's already been done. This has all basically been made available in the quantstrat project (google it) -- the documentation is online and you can see lots of worked examples in the R-SIG-Finance archives. The PerformanceAnalytics package can also help with your plotting needs. Michael On Fri, Apr 6, 2012 at 11:19 PM, sysot1t wrote: > newbie to R, less than a week, and I ordered some books about R, but I learn > better by examples.. and thus far I cant find a good example of what I am > trying to do... which follows: > > assuming one is using any instrument intra-day data... I want to.. > > open a file (lets name it signal) that will contain two fields... > date/time(MM/DD/ HH:MM) and signal (1=buy,-1=sell) > open a file with real time data for instrument (I cant find anything that > will let me access intra-day online directly from someone like IQFeed or > eSignal) the content of the file will look as follows: > > "Date","Time","Open","High","Low","Close","Volume" > 05/16/2007,10:15,74.800,74.850,74.550,74.725,123 > 05/16/2007,10:16,74.700,74.700,74.600,74.625,33 > 05/16/2007,10:17,74.675,74.725,74.600,74.600,21 > > I would like to be able to determine the start and end of the period to > test, and verify that signals exist within that period or assume the signals > are 0... for no trades.. > > then I would like to basically process the signal file.. and at the time of > the "signal" whenever I see -1 then sell instrument, if I see 1, then buy > it... to determine the buy price, I would like to make sure the signal time > coincides with the intraday data time.. and then either buy/sell the next > minute open... then given a set of variables (target, stop) I would > basically either sell at target or stop... the other thought is to buy/sell > after X number of target/stop bars.. also, if an opposite signal is > processed before target/stop are reached, the position would immediately > reverse... > > the above assumes 1 minute bars for simplicity > > to view the results, I want to then chart the chart candles and the signals > on the chart... with the P&L below the chart... assuming a starting > portfolio of X size, where X is a variable set to 0.00... > > any assistance at all would be greatly appreciated... if you can, please > document any code tidbits to assist with my learning process... > > thanks! > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/newbie-question-strategy-tp4538818p4538818.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.