367 search results for "quantmod"

Twinkle,twinkle little STAR

May 26, 2014
By
Twinkle,twinkle little STAR

At the recent R/Finance 2014 conference in Chicago I gave a talk on Smooth Transition AR models and a new package for estimating them called twinkle. In this blog post I will provide a short outline of the models and an introduction to the package and its features. Financial markets have a strong cyclical component

Read more »

Calendar Strategy: Fed Days

May 6, 2014
By
Calendar Strategy: Fed Days

Today, I want to follow up with the Calendar Strategy: Option Expiry post. Let’s examine the importance of the FED meeting days as presented in the Fed Days And Intermediate-Term Highs post. Let’s dive in and examine historical perfromance of SPY during FED meeting days: Please note 100 day moving average filter above. If we

Read more »

Calendar Strategy: Option Expiry

May 2, 2014
By
Calendar Strategy: Option Expiry

Today, I want to follow up with the Calendar Strategy: Month End post. Let’s examine the perfromance Option Expiry days as presented in the The Mooost Wonderful Tiiiiiiime of the Yearrrrrrrrr! post. First, I created two convenience functions for creating a calendar signal and back-testing calendar strategy: calendar.signal and calendar.strategy functions are in the strategy.r

Read more »

Calendar Strategy: Month End

April 27, 2014
By
Calendar Strategy: Month End

Calendar Strategy is a very simple strategy that buys an sells at the predetermined days, known in advance. Today I want to show how we can easily investigate performance at and around Month End days. First let’s load historical prices for SPY from Yahoo Fiance and compute SPY perfromance at the month-ends. I.e. strategy will

Read more »

chart with individual signals

April 12, 2014
By
chart with individual signals

Also I'm not to much into Technical Indicators and Chart-Analysis during system development it is sometimes handy to visualize your buy and selllimits in a chart.The quantmod package provides a nice charting environment and you can select from a bunch ...

Read more »

Using R to model the classic 60/40 investing rule

April 9, 2014
By
Using R to model the classic 60/40 investing rule

Image by Timothy Poulton   A long-standing paradigm among savers and investors is to favor a mixture of 40% bonds and 60% equities. The simple rationale is that stocks will provide greater returns while bonds will serve as a diversifier when if equities fall. If you are saving for your pension, you probably heard this

Read more »

Quality of Historical Stock Prices from Yahoo Finance

April 7, 2014
By
Quality of Historical Stock Prices from Yahoo Finance

I recently looked at the strategy that invests in the components of S&P/TSX 60 index, and discovered that there are some abnormal jumps/drops in historical data that I could not explain. To help me spot these points and remove them, I created a helper function data.clean() function in data.r at github. Following is an example

Read more »

Probabilistic Momentum with Intraday data

March 30, 2014
By
Probabilistic Momentum with Intraday data

I want to follow up the Intraday data post with testing the Probabilistic Momentum strategy on Intraday data. I will use Intraday data for SPY and GLD from the Bonnot Gang to test the strategy. Next, let’s examine the hourly perfromance of the strategy. There are lots of abnormal returns in the 9:30-10:00am box due

Read more »

Capturing Intraday data

March 10, 2014
By
Capturing Intraday data

I want to follow up the Intraday data post with an example of how you can capture Intraday data without too much effort by recording 1 minute snapshots of the market. I will take market snapshots from Yahoo Finance using following function that downloads delayed market quotes with date and time stamps: Next we can

Read more »

Intraday data

March 9, 2014
By
Intraday data

In the Intraday Backtest post I showed an example of loading and working with Forex Intraday data from the FXHISTORICALDATA.COM. Recently, I came across another interesting source of Intraday data at the Bonnot Gang site. Please note that you will have to register to get access to the Intraday data; the registration is free. Today,

Read more »