gabri

Random Walk Strategy

Category: Strategies By: gabri Created: March 19, 2018, 8:34 AM
March 19, 2018, 8:34 AM
Strategies
3 Comments
Random Walk Strategy

This is a variation of the “Price Index 6 months strategy” and it’s LONG only. The selected stock has to be a good performer in terms of Price Index value. While in the former strategy the exit was made ALWAYS after a hold period of one year, in this strategy we sell in one of the following cases:

1. Gain = 40% (or whatever value chosen)
2. Loss = 20% (or half the target gain)
3. after 6 months holding time without exiting as per points 1 or 2 (you can also use 3 months max hold time)

I’ve been using this strategy real-money with portfolios of stocks from different countries for about 5 years and a half now with a annualized return of the portfolio of about 26% (I uses a portfolio with 30 to 50 stocks).
If you select the top stocks in terms of the relative strength in their sector the annualised return is approximately 35%.

Blue skies!

// Definizione dei parametri del codice
DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
p=130
out=40

// Condizioni per entrare su posizioni longs
c1 = (100*(close - close[p])/close[p])>44

IF c1 and not longonmarket THEN
 BUY 20000 cash AT MARKET
ENDIF
barontrade=barindex-tradeindex
 
// exit long position
IF barontrade=130 THEN
 SELL AT MARKET
ENDIF

set target %profit out
set stop %loss out/2

Download
Filename: PRT-random-walk.itf
Downloads: 407
Download
Filename: Random-walk.png
Downloads: 120
gabri
gabri Master
Operating in the shadows, I hack problems one by one. My bio is currently encrypted by a complex algorithm. Decryption underway...
Author’s Profile

Comments

pixx
7 years ago
#

ciao gabri scusa una domanda mi ptresti spiegare il codice perfavore??

gabri
8 years ago
#

Hi, I am not sure the reason you have this problem. I am not familiar with the free version of PRT

Milochenta
8 years ago
#

Hello, I downloaded your strategy and I can not get it to have signals. I work with the free PRT version, so I only have daily data. Is it possible that I need to change the ranges of the indicators?

ProRealCode ProRealCode
Loading...