[R] R and Forex

R. Michael Weylandt michael.weylandt at gmail.com
Wed Oct 12 21:07:52 CEST 2011


As was pointed out to you before, this is really more of an
R-SIG-Finance question, but I wouldn't expect too much explanation
there either, just people pointing you to the standard R finance tools
(quantmod, zoo/xts, TTR, RBloomberg, and the Rmetrics suite; there's
also some fantastic tools in development but if you just picked up
your first book on R, you probably aren't ready for those yet).

You question isn't particularly well-defined either:

Do you just want to study currency price series in R? This is simple:
just get the data (perhaps from oanda using quantmod::getSymbols or
simply by reading in through any of the regular functions) and study
it however you like.

The actual act of trading, however, is harder to do solely within R:
there is a very popular IBrokers API but I haven't used it much. It
sounds like you are probably a lone trader so if you don't have a
pre-existing relationship with IBrokers you'll probably want to enter
trades through whichever broker you currently use. That -- the
IBrokers package -- is the complete only solution on that end I'm
aware of, though I'm sure many folks have their own work-arounds.

And as far as experiences go: well, I suppose folks wouldn't be doing
it if they thought there was no money to be made, now would they?

If you want more to read: check the CRAN task views, as suggested before.

Michael

PS -- A serious note: FX is much closer to a zero-sum game than
long-equity, I would be remiss if I didn't warn you to tread
carefully.

On Wed, Oct 12, 2011 at 1:50 PM, Yves S. Garret
<yoursurrogategod at gmail.com> wrote:
> Yes, that's what I meant.  Curious what the experiences were of some people
> and some tips.
>
> On Wed, Oct 12, 2011 at 12:31 PM, R. Michael Weylandt
> <michael.weylandt at gmail.com> wrote:
>>
>> "This" being what exactly?
>>
>> Traded in FX using R? Yes, its done everyday, even as I type....
>>
>> Michael
>>
>> On Wed, Oct 12, 2011 at 8:10 AM, Yves S. Garret
>> <yoursurrogategod at gmail.com> wrote:
>> > No, that's not what I meant.  I was curious if anyone has ever done this
>> > before and how well it worked.  Any tips for a novice?
>> >
>> > On Wed, Oct 12, 2011 at 12:19 AM, Liviu Andronic
>> > <landronimirc at gmail.com>wrote:
>> >
>> >> On Wed, Oct 12, 2011 at 3:29 AM, Yves S. Garret
>> >> <yoursurrogategod at gmail.com> wrote:
>> >> > Hi all,
>> >> >
>> >> >   I recently started learning about Forex and found this O'Reilly
>> >> > book in
>> >> > Barnes & Nobles about R.  I bought it out of pure curiosity.  I like
>> >> > what
>> >> I
>> >> > see.  However, I have a question.  Has anyone tried to bring these
>> >> > two
>> >> ideas
>> >> > together in a financial and trading sense?  Are there any libraries
>> >> > or
>> >> > modules in R that can aid in this venture?
>> >> >
>> >>
>> >> > fortune('equity')
>> >>
>> >> I have never heard anyone (knowledgable or otherwise) claim that, in
>> >> the
>> >> absence of transition costs, SAS is better than R for equity modeling.
>> >> If
>> >> you
>> >> come across any such claim, I would be happy to refute it.
>> >>   -- David Kane
>> >>      R-SIG-Finance (December 2004)
>> >>
>> >>
>> >> You may want to address this question to r-sig-finance, and check out
>> >> the Finance Task View [1]. Regards
>> >> Liviu
>> >>
>> >> [1] http://cran.at.r-project.org/web/views/Finance.html
>> >>
>> >>
>> >> > --Yves
>> >> >
>> >> >        [[alternative HTML version deleted]]
>> >> >
>> >> > ______________________________________________
>> >> > R-help at 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.
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Do you know how to read?
>> >> http://www.alienetworks.com/srtest.cfm
>> >> http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
>> >> Do you know how to write?
>> >> http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
>> >>
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at 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.
>> >
>
>



More information about the R-help mailing list