360 search results for "quantmod"

Aggregate portfolio contributions through time

September 25, 2014
By
Aggregate portfolio contributions through time

The last CRAN release didn’t have much new functionality, but Ross Bennett and I have completely re-written the Return.portfolio function to fix some issues and make the calculations more transparent.  The function calculates the returns of a portfolio given asset returns, weights, and rebalancing periods – which, although not rocket science, requires some diligence about it. Users of this

Read more »

Adjusted Momentum

July 31, 2014
By
Adjusted Momentum

David Varadi has published two excellent posts / ideas about cooking with momentum: VIX-Adjusted Momentum Error-Adjusted Momentum I just could not resist the urge to share these ideas with you. Following is implementation using the Systematic Investor Toolbox. Please enjoy and share your ideas with David and myself. To view the complete source code for

Read more »

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 »

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 »