A dummy trading strategy implemented by Matlab

The following is a paper trading result on the historical data of SPY using simple strategy. Since the trade is based on entirely random decision, the performance of the portfolio gives a low end benchmark. It is implemented by Matlab.

Given initial capital {V_{0} = 20000} at starting date, we follow the strategy of this below. In the morning of each Monday, we do following transactions: Toss a coin. If the outcome is face-up, then half of the total wealth will be invested to risky asset. Otherwise, we clear all risky position. Following the above strategy on the period (29-Jan-1993 to 21-Jun-2013), the annualized return rate is approximately 0.00641.

The implementation is completed by Matlab programing by semi-automatically. First, using the Datafeed toolbox, download SPY historical price from Yahoo Finance server. The downloaded data is saved to “spy130622.mat” file.
(Download) Then, one can run this Matlab code “trade1.m”. ( Download )

Advertisements

One comment


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s