Skip to content

QuantMod trading models docs?

9 messages · Daniel Cegiełka, Mark Knecht, Jeff Ryan

#
Yes, that's the command on the blotter page, but it seems that the
files have gone missing or something...
Warning: unable to access index for repository
http://R-Forge.R-project.org/bin/windows/contrib/2.9
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ?blotter? is not available
As I said earlier, if I go to the download link and try to download
the Windows zip version it says there's nothing there. Same as this
command is saying.

I'll try again later. Maybe it's just having problems right now.

Thanks,
Mark

2009/10/11 Daniel Cegie?ka <daniel.cegielka at gmail.com>:
1 day later
#
Hi Daniel,
   Thanks for your help. this morning I see that the Blotter package
was once again available for download using the command below so I'm
able to load it and run the turtles demo. (VERY slowly by the way!)

   Anyway, this is extremely helpful and fives me something to study
to see if what I'd like to do is possible in R.

Cheers,
Mark

2009/10/11 Daniel Cegie?ka <daniel.cegielka at gmail.com>:
#
One comment on blotter and speed.

The most recent CRAN version of xts doesn't handle repeated subsetting
by time-class objects very efficiently.

This is the primary cause of pain in the blotter you are trying (likely).

The recent R-forge version of xts has had this corrected, and should
represent something close to 60x better performance.

HTH,
Jeff

2009/10/12 Mark Knecht <markknecht at gmail.com>:

  
    
#
Jeff,
   Thanks. Can I just install that over the top of the currently
installed CRAN version? If so I'll give it a try today. If not then am
I required to so a remove.packages first?

   To keep the email list smaller thanks for the pointer over the
weekend to the previous conversation on this topic. It's clear folks
have given this a great deal of thought and there are a number of
tools out there that address at least portions of the problem. that
should make for many hours of investigation on my part.

   Maybe it's just a terminology thing but I'm surprised that
backtesting - to me simply executing the model on a given data set and
collecting the results - should be considered so difficult. I would
have thought that would be relatively straight forward and maybe
optimization would be the real problem.

   In terms of and code I'd certainly be happy to share non-system
specific portions but please don't hold your breath. I'm not a
programmer so all of this stuff is a struggle and results come very
slowly. That said my original thought on this would have turned some
of what I see in blotter into something that looks a bit more like
EasyLanguage on TradeStation, but that's just so I can go back and
forth between R and TS. EL really only has 4 commands for buy/sell
operations:

Buy
Sell
SellShort
BuyToCover

and then adds the modifiers "market", "stop" o r limit" to specify the
way the order executes against price. I was going to focus on creating
some code to do that and see where it led me.

   I am a bit concerned reading through your thread that possibly I'm
going to have real trouble with tick data in R? I'm not working on
end-of-day stuff as I'm a day trader and am flat every night. (Deity
willing) My tick data is has date and time but isn't guaranteed unique
in that respect. Is there any reason you or others know of why xts or
zoo should not handle tick data?

   Clearly I have a lot to study and since turtles now runs I can do that.

Cheers,
Mark

2009/10/12 Jeff Ryan <jeff.a.ryan at gmail.com>:
#
Should just be able to install over.  You will have to wait for the
updates on R-forge to get built, or you could always install from
source (the svn tree).
Usually does make things faster.
Tick data should be no problem for xts or zoo.  Many people use it for
that with good success.  Uniqueness is an issue outside of the time
representation.  You can always do something to make the timestamp
unique.  The question is whether or not you should treat it as unique.
 Depends on what you are doing really.

Others on this list are very active in the high-freq space, so one or
more may provide some detailed comments.
Keep us posted (on or off list).

Thanks,
Jeff

  
    
#
2009/10/12 Jeff Ryan <jeff.a.ryan at gmail.com>:
I guess I could switch to a Gentoo machine to do my own builds from
SVN but mostly I'm stuck on Windows during the day due to
TradeStation. I have no experience building anything from source on
Windows. I'll try Gentoo this afternoon as an experiment and see if it
works out at all.
Certainly. I can output BarNumber from TradeStation or just create my
own value in R.
Nothing high-frequency about my trading today. Seems like the futures
market is stuck in a few tick window this morning... :-)
Will do.

Cheers,
Mark