ConnorsRSI

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8868
Registrado: 09 May 2012 01:38

ConnorsRSI

Mensajepor Dalamar » 17 Mar 2017 07:01

Estaba leyendo el siguiente articulo: http://alvarezquanttrading.com/2017/03/ ... 00-stocks/

The Strategy

Test range from 1/1/2007 to 12/31/2016. Any mention of ConnorsRSI is using the default parameters of (3,2,100).

Set up Rules

    A. Stock is member of the S&P 500 index
    B. It has been less than (10,15,20,25,30) days since a 39 week high
    C. ConnorsRSI is less than (10 to 40 in steps of 2.5)
Rule (A) gives us a good trading universe.

Rule (B) is looking for a stock with recent strength. Why 39 weeks? Originally I was trying to decide between 26 weeks and 52 weeks. I decided to split the difference.

Rule (C) is our sell off rule. Nothing fancy but I wanted to test a large range of values

Entry Rules

If we have a set up, then enter a limit order for the next day at (.5, 1.0, 1.5, 2.0)% below the close. Order good for one day only.

Only place enough orders so if they are all filled you are not in more than 7 positions
If have multiple set ups, then rank from high to low by the 100 day historical volatility.
We enter on additional intraday weakness.

Exit Rules

ConnorsRSI is greater than (50, 55, 65, 70)
Exit on next open
Simple mean reversion exit of waiting for the bounce. No stops. You may have also noticed there is no market timing rule. Will this get killed in 2008?


Vamos a replicarlo con python y despues optimizarlo con machine learning en lugar de usar reglas y estadisticas.
Adjuntos
CRSI-170306-AQT.zip
(456.32 KiB) Descargado 12 veces
ConnorRSI1.png
ConnorRSI2.png
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8868
Registrado: 09 May 2012 01:38

Re: ConnorsRSI

Mensajepor Dalamar » 17 Mar 2017 15:59

Para aplicar a este caso machine learning tenemos que analizar:

1. Cuando comprar, crear features a optimizar para tener un sistema que nos indique cuando comprar, el principal problema viene en identificar cual ha sido una compra buena y una compra mala, que es el sistema de recompensa que usaremos para entrenar el sistema.

2. Cuando vender, tendremos que crear casos en los que ya hemos comprado y analizaremos el mejor momento para vender usando features, aqui la complejidad esta en crear casos en los que ya estamos comprados y ver como evoluciona el movimiento durante X tiempo en el cual optimizaremos la venta.

3. Este es el caso mas complicado que es cuanto comprar en caso de que tengamos mas de una oportunidad y si mantener cash o vender uno para comprar otro.
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8868
Registrado: 09 May 2012 01:38

Re: ConnorsRSI

Mensajepor Dalamar » 17 Mar 2017 16:03

Como calculamos ConnorRSI?

There are three major components to Connors RSI

RSI = Standard RSI developed by Wilder. This is typically a short-term RSI. In this example it is a 3 Period RSI.

UpDown Length = The number of consecutive days that a security price has either closed up (higher than previous day) or closed down (lower than previous days).
Closing up values represented in positive numbers and closing down is represented with negative numbers.
If a security closes at the same price on back to back days, the UpDown Length is 0.
Connors RSI then applies a short-term RSI to the UpDown Streak Value. In this example it is a 2 period RSI.

ROC = The Rate-of-Change. The ROC takes a user-defined look-back period and calculates a percentage of the number of values
within that look back period that are below the current day price change percentage.


The final CRSI calculation then simply finding the average value of the three components.

CRSI(3,2,100) = [ RSI(3) + RSI(UpDown Length,2) + ROC(100) ] / 3


Adjunto los componentes de S&P para poder descargar los historicos.
Adjuntos
SP500.zip
(7.98 KiB) Descargado 8 veces
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!


Volver a “Laboratorio de inversion y especulacion”

cron

Ingresar