351 search results for "quantmod"

Using apply, sapply, lapply in R

December 18, 2012
By

This is an introductory post about using apply, sapply and lapply, best suited for people relatively new to R or unfamiliar with these functions. There is a part 2 coming that will look at density plots with ggplot, but first I thought I would go on a tangent to give some examples of the apply family, as they...

Read more »

Live Correlation plot, shiny improvement.

December 16, 2012
By

Open CPU is a great project. Few months back, I wrote a function for plotting a moving window of the market average correlation. Jeroen C.L. Ooms was nice enough to upload it to their server. Something is now changed. Quotes … Continue reading →

Read more »

Financial Turbulence Example

December 1, 2012
By
Financial Turbulence Example

Today, I want to highlight the Financial Turbulence Index idea introduced by Mark Kritzman and Yuanzhen Li in the Skulls, Financial Turbulence, and Risk Management paper. Timely Portfolio did a great series of posts about Financial Turbulence: Part 1, Part 2, Part 3. As example, I will compute Financial Turbulence for the equal weight index

Read more »

Trading with Support Vector Machines (SVM)

November 30, 2012
By
Trading with Support Vector Machines (SVM)

Finally all the stars have aligned and I can confidently devote some time for back-testing of new trading systems, and Support Vector Machines (SVM) are the new “toy” which is going to keep me busy for a while. SVMs are a well-known tool from the area of supervised Machine Learning, and they are used both

Read more »

Yahoo Tickers for DAX,MDAX,SDAX

November 25, 2012
By

  In my various R - Tests I'm using usually the Yahoo Dataservice implemented in quantmod suppressWarnings(try(getSymbols(ticker, index.class="POSIXct", from=initDate, to=to,src="yahoo"),silent=TRUE))  If you would like to run ...

Read more »

Extending Commodity time series

November 21, 2012
By
Extending Commodity time series

I want to follow up with Extending Gold time series post by showing how we can extend Commodity time series. Most Commodity ETFs began trading in 2006, please see the List of Commodity ETFs page. I will use DBC – PowerShares DB Commodity Fund, one on the most liquid Commodity ETFs as my proxy for

Read more »

Regime Detection Pitfalls

November 14, 2012
By
Regime Detection Pitfalls

Today, I want to address some questions that I was getting regarding the Regime Detection post. In the Regime Detection post I showed an example based on the simulated data, and some of you tried to apply this example to actual stocks. There is one big problem that you have to be aware in designing

Read more »

Portfolio Trading

November 12, 2012
By
Portfolio Trading

In finance and investing the term portfolio refers to the collection of assets one owns. Compared to just holding a single asset at a time a portfolio has a number of potential benefits. A universe of asset holdings within the … Continue reading →

Read more »

Back-testing Rules

November 10, 2012
By
Back-testing Rules

Nowadays there are many trading strategies shared online with reproducible, decent, results. Have you asked yourself, if the strategies are so profitable, why the author bother even sharing them, when the path to riches is clear – just implement the strategy and use it? There are people, of course, who are fascinated and challenged by

Read more »

Regime Detection

October 31, 2012
By
Regime Detection

Regime Detection comes handy when you are trying to decide which strategy to deploy. For example there are periods (regimes) when Trend Following strategies work better and there are periods when Mean Reversion strategies work better. Today I want to show you one way to detect market Regimes. To detect market Regimes, I will fit

Read more »