726 search results for "finance"

How to backtest a strategy in R

March 26, 2011
By

This is the third post in the Backtesting in Excel and R series and it will show how to backtest a simple strategy in R.  It will follow the 4 steps Damian outlined in his post on how to backtest a simple strategy in Excel.Step 1: Get the dataThe ...

Read more »

Yeah Sure, Maybe, Well … Okay

March 23, 2011
By
Yeah Sure, Maybe, Well … Okay

Whoever wrote the book on statistics, probably avoided getting a proper education in literature. At least that's my null hypothesis. The cryptic and awkward presentation of probabilities common amongst the Frequentists (no, not the Latin American Socia...

Read more »

Downloading S&P 500 Data to R

March 23, 2011
By

The cornerstone of your analysis and quantitative trading algorithms are data. There are lots of different ways how to do it in R (depending of what your investment instruments are). Today I am going to download data from finance.yahoo which are stock ...

Read more »

Some upcoming R courses

March 18, 2011
By

A couple of quick notes about some upcoming R courses: In Vancouver, Canada, R trainer Isabella Ghement is presenting two R courses: An Introduction to the Statistical Software Package R, 8:30am-4:30pm, March 30-31, 2011, Vancouver, B.C., Canada (http://www.ghement.ca/RworkshopMarch30and31_2011.html) Advanced Statistical Modeling Using the Statistical Software Package R, 8:30am-4:30pm, May 5-6, 2011, Vancouver, B.C., Canada (http://www.ghement.ca/RworkshopMay5and6_2011.html); And in Seattle, Washington...

Read more »

How to backtest a strategy in Excel

March 14, 2011
By

(This is a guest post by Damian from Skill Analytics and ETF Prophet) Let me start by saying that I’m not an expert in backtesting in Excel – there are a load of very smart bloggers out there that have, as I would say, “mad skillz” at working with Excel including (but not limited to) Michael Stokes over...

Read more »

How to backtest a strategy in Excel

March 14, 2011
By

(This is a guest post by Damian from Skill Analytics and ETF Prophet)Let me start by saying that I’m not an expert in backtesting in Excel – there are a load of very smart bloggers out there that have, as I would say, “mad skillz” at working with Excel including (but not limited to) Michael Stokes over...

Read more »

How to Vectorize Nested Loop in R?

Could any R expert here help me to vectorize my for loop? Thanks in advance for your favor. The reason I am in trouble is the variable inside my "for" function are updated after each loop, which makes me feel difficult to use lapply, sapply or whatever. Simplifed codes are listed below:for (i in 1:N) { #N could be...

Read more »

money is coin $ flip

March 7, 2011
By
money is coin $ flip

Well, sorta. More precisely, money is the sum of coin$flip divided by the number of coin$flip. But we'll get to that later. For now, let me introduce you to a new algorithm written in R. This one is another "quote" -- simple few lines of code -- whose ...

Read more »

John Chambers, the inventor of S, added reference classes to R…

February 26, 2011
By
John Chambers, the inventor of S, added reference classes to R…

John Chambers, the inventor of S, added reference classes to R 2.12, and oh boy are they fun to look at! What you see in the picture above is a “Hello World” web application for R. It’s written using the Rack R package (not unlike Ruby’s Rac...

Read more »

Interest Rates’ Influence on 1987

February 21, 2011
By
Interest Rates’ Influence on 1987

One aspect of 1987 that does not deserve enough attention is interest rates.  Higher interest rates constrain economic activity and compete with other investments.  As seen in the chart below, the US 10year Treasury rate climbed 40% from 7% t...

Read more »