Tag Archives: Financial

Here is my Google Android mobile app details: Learn how to build financial trading models and strategies with the R language

Here is my Google Android mobile app details: Learn how to build financial trading models and strategies with the R language

 

1. Title

 

Financial Trading Model How-To

 

2. Description

 

Are you ready to learn financial trading model development and strategy development using R, the open source statistical programming language?

 

R is free to use and just as powerful as the very expensive Matlab if you understand how to deploy it properly. And Quantlabs.net is the only website that teaches you how R fits into next generation quant analysis and quant trading.

 

Learn automated, systematic and algorithmic-based systems including high frequency trading (HFT) for stocks, futures, options and forex.

 

Quantlabs.net features regular tutorials on all these topics — check out every one as it’s published with this handy app that links to the Quantlabs.net blog feed.

 

3. Promo text

 

Learn how to build financial trading models and strategies with the R language

 

 

Learn how to do trading with R to build financial models, strategies, models, HFT, forex in our Google Android App

Learn how to do trading with R to build financial models, strategies, models, HFT, forex in our Google Android App

This should be on the Google Android Play app store soon.

Find out when this app is ready to go via our newsletter.

[youtube_sc url=”http://www.youtube.com/watch?v=re8bQkQeuxk” playlist=”quant r google app” title=”quant%20r%20google%20aoo”]

Are you a professional R user seeking to create and improve upon profitable financial forecasting models and algorithms?

 

Are you a professional R user seeking to create and improve upon profitable financial forecasting models and algorithms?

 

If that’s you, I’m running a survey right now which addresses your interests.

 

You see, I’m currently preparing video tutorial walkthroughs for various model types. Included on my “to do” list (or already done) are the following:

 

Garch

 

Arima

 

Arma

 

PCA

 

Markov chain or mcmc

 

CAPM

 

Autoregressive (AR)

 

Bayesian

 

Event arbitrage

 

Market inefficiency

 

Mape

 

Mean reversion

 

Moving average

 

Is there anything missing from that list within this survey?

 

As you’ve probably noticed, the current list features popular models which are rather “vanilla” or academic. They’re almost certainly being tweaked in highly proprietary ways by bank prop desks, hedge funds, and similar institutions in the real world.

 

But the essential bits and pieces are there (mostly). I’ve only encountered difficulty finding R source code example tutorials for PCA and Markov. Probably because few people have used them in quant financial modeling up until now! If you know differently, I’d appreciate hearing about it.

 

Other facts of note I’ve uncovered during my search include the reality that you can accelerate single threaded R execution by blending in other languages. C++ for example is often used in conjunction with great R packages like Rcpp or Rinside.

 

Parallelization and NOsql database solutions also accelerate simulations and calculations. There’s even other uses like GPU, FPGA, and Cuda. The flexibility seems endless.

 

But I digress. My primary goal with this survey is to discover what models R users and developers are using for their own research. This helps me, but also you too. You’ll have access to the survey results, after all.

 

I’ll even be incorporating the results of this survey in terms of what to present for my new R Matlab User group.

 

What kind of profitable financial forecasting models and algorithms do R professional users focus on?

What kind of profitable financial forecasting models and algorithms do R professional users  focus on?

I am on the hunt for various modeling types which I have comes across. I can list a bunch but I am sure there a pile I would be missing as well.

The ones I have under my radar right now include:

Garch

Arima

Arma

PCA

Markov chain or mcmc

CAPM

Autoregressive (AR)

Bayesian

Event arbitrage

Market inefficiency

Mape

Mean reversion

Moving average

​Answer this survey here.

It seems I am having no problems finding R source example tutorials with the exception of PCA and Markov. Maybe these are not used as much within the world of quant financial modeling? Or at least within R vs Matlab. Who knows but surveys like this help me understand what R users are actually focusing on.

if you have an opinion I what could be missing, please comment because I would be highly interested in what others have to say on what could be missing. As you can tell from the above list, these types of models are most likely popular or just more academic. I do realize what is used with industries like banking, hedge funds, these models could be significantly altered or tweaked to make them highly proprietary and obviously profitable. We would usually never know that secret.

Also from the R tutorials I am seeing also blend other languages which help speed up the execution of single threaded R. Certain examples that come to mind is C++ with the help of fantastic R packages like Rcpp or Rinside. With some heavy computing (also known as expensive) makes uses of parallelization or NOsql database solutions to help speed up simulations and calculations. I never even investigated other uses likes GPU, FPGA, or Cuda. Does it ever stop?

​As said, my primary goal is to find what kind of models R users and developers are using for their own research. It seems these same polls not only help me, but help others as well as they have access to the poll results.

​​The one thing I find very overwhelming is what actually is profitable and which could be duds in terms of models. Obviously these are very important things to consider when spending vast amounts of time in certain model development using a tool like R,

These answers help me figure out what to present for my new R Matlab User group.

 

 

 

How to use Principal component analysis for financial within R

How to use Principal component analysis for financial within R
These two links will help you understand what PCA is within R
http://www.r-bloggers.com/principal-component-analysis-use-extended-to-financial-economics-part-1/
http://www.r-bloggers.com/principal-component-analysis-use-extended-to-financial-economics-part-2/

For part 1 to create data, use http://www.nseindia.com/content/indices/ind_cnx500.htm, click Daily Return values and select period. Download as a CSV to be named Returns_CNX_500.csv. It appears to load fine.  You will also need to create a matrix called return1 before executing the code.

For part 2, you need to download MIBOR.CSV from http://dl.dropbox.com/u/20480592/MIBOR.csv

Other than that, the code in part 2 does work!

The mother load of R packages for financial trading, quant, and potential high frequency trading (HFT) needs

The mother load of R packages for financial trading, quant, and potential high frequency trading (HFT) needs

So there seems to be this endless supply of what look to be a decent list of R finance packages. Some of these include quant based ones. This is my first day researching so I cannot vouch for any of these yet. I do know some R packages can be duds but I am not sure if these ones will be either but are part of CRAN which says positive things. Here we go:

Extreme value analysis:

http://cran.r-project.org/web/packages/evir/evir.pdf

Refer to p 39 for parameter use in Gvt:

http://www.stat.colostate.edu/graybillconference2009/Workshop%20Files/ShortCourseGraybill.pdf

 

 

Potential fat tail analysis which lead to the ones below:

http://braverock.com/brian/R/PerformanceAnalytics/html/Return.Geltner.html

PerformanceAnalytics package is quite amazing and easy to use for the amount of analysis it has: i.e. VaR

http://r.789695.n4.nabble.com/Value-at-risk-td3516991.html

Overview and demo of PerformanceAnalytics (PA):

http://cran.r-project.org/web/packages/PerformanceAnalytics/vignettes/PerformanceAnalyticsChartsPresentation-Meielisalp-2007.pdf

http://www.rinfinance.com/RinFinance2009/presentations/PA%20Workshop%20Chi%20RFinance%202009-04.pdf

How read profitable data and convert to PA package

http://quant.stackexchange.com/questions/1536/use-trades-as-input-for-performanceanalytics

How to back test strategies with PA:

http://blog.fosstrading.com/2011/03/how-to-backtest-strategy-in-r.html

A technical package:

http://cran.r-project.org/web/packages/TTR/index.html

TradeAnalytics packages which includes quantstrat:

 

 

http://cran.r-project.org/web/packages/TTR/index.html

Intro to quantstrat:

http://blog.fosstrading.com/2011/08/introduction-to-quantstrat.html

General list of R packages for quant trading:

http://blog.fosstrading.com/2011/08/introduction-to-quantstrat.html

The motherload of all financial trading packages in CRAN:

http://cran.wustl.edu/web/views/Finance.html

I feel like a kid a candy factory with all this. Makes me wonder how Matlab is going to keep up. Wow! Thanks to all contributors above for all these. Now I have to start digging and play with everything. I will also keep reporting through this blog for those interested.