364 search results for "quantmod"

Backtesting a Simple Stock Trading Strategy

September 13, 2011
By
Backtesting a Simple Stock Trading Strategy

Note: This post is NOT financial advice!  This is just a fun way to explore some of the capabilities R has for importing and manipulating data.   I recently read a post on ETF Prophet that explored an interesting stock trading strategy in Ex...

Read more »

25+ more ways to bring data into R

August 26, 2011
By
25+ more ways to bring data into R

The rdatamarket post on the Revolutions blog and this post on Decision Stats reminded me about my list of Data APIs/feeds available as packages in R on Cross-Validated (which is a great site that you all should use).  Many of these packa...

Read more »

Mode vs Mean in Tactical Allocation

August 25, 2011
By
Mode vs Mean in Tactical Allocation

Let’s take Modest Modeest for Moving Average one step further and use it in a basic tactical allocation system using Vanguard funds.  THIS IS NOT INVESTMENT ADVICE AND VERY EASILY MIGHT CAUSE LARGE LOSSES.  VANGUARD FUNDS IMPOSE EARLY REDEM...

Read more »

Modest Modeest for Moving Average

August 24, 2011
By
Modest Modeest for Moving Average

I have no idea who originated the idea of using moving averages to determine entry and exit points in a trading system.  I do know that Mebane Faber (briefly discussed in Shorting Mebane Faber) has recently popularized the notion through his >7...

Read more »

Graphically analyzing variable interactions in R

August 23, 2011
By
Graphically analyzing variable interactions in R

I studied Ecology as an undergraduate, which meant I spent a lot of time gathering and analyzing field data. One of the basic tools we used to look for relationships in a large set of variables was correlation and scatterplot matrices. Each of these ...

Read more »

Drawdown Visualization

August 22, 2011
By
Drawdown Visualization

Drawdown is my favorite measure of risk.  It picks up extended autocorrelated pain often not seen in risk measures, and best illustrates frustration, panic, and loss of confidence (Drawdown Control Can Also Determine Ending Wealth).  I though...

Read more »

Real Squeeze

August 17, 2011
By
Real Squeeze

Real yields even out to 10 years have now been competely squeezed. Either bond investors need to accept even worse negative real yields or deflation needs to get ugly for additional price returns from here. If deflation is the outcome, then shorts in s...

Read more »

-1% Guaranteed Real Real Return! Yummy??

August 17, 2011
By
-1% Guaranteed Real Real Return! Yummy??

If we’re cooking up a bond return, we have access to 3 ingredients: inflation, credit, and real. Historically, the recipe looks like this (as described in Historical Sources of Bond Returns).0-5 parts inflation + 1-2 parts credit + 1-3 parts realand ...

Read more »

ttrTests Experimentation

August 16, 2011
By
ttrTests Experimentation

I was intrigued by the CRAN update on a package ttrTests, especially since quantstrat is not built for backtesting system parameters and analyzing system performance as I mentioned in A Quantstrat to Build On Part 6.  ttrTests offers a nice start ...

Read more »

Use geom_rect() to add recession bars to your time series plots #rstats #ggplot

August 15, 2011
By
Use geom_rect() to add recession bars to your time series plots #rstats #ggplot

ggplot2's geom_rect() layer makes it easy to highlight portions of your graph, such as recessions on an economic time series.

Read more »