Jeudi 12 février 2009 4 12 /02 /Fév /2009 20:41

Les mots sont lachés.

Voici un petit site génial : http://www.wordle.net/



Je posterai dorénavant sous cette forme .

Par hk_lisse - Publié dans : Commentaires
Voir les 0 commentaires
Mardi 20 janvier 2009 2 20 /01 /Jan /2009 13:09

La Saisonnalité du CAC.

Voici 2 petits programmes qui permettent de superposer les cours de différentes périodes.  Le premier démarre avec une base 100 au 1er janvier alors que le second donne la courbe brute.

Ci-après une vue du CAC :
- En noir 2008.
- En vert 2007
- En blanc 2006
- En rouge foncé 2005
- En jaune 2004
- En orange 2003
- En bleu 2002
- En turquoise 2001
- En olive 2000
- En rouge 1999
- En violet 1998




On peut ainsi comparer le bear market précédent et la période actuelle.  On peut également faire une analyse de la saisonnalité.

Les codes des programmes pour Prorealtime :  Il faut introduire période (intervalle de temps passé) et compa (intervalle sur lequel on superpose le précédent) en variables.  Par exemple : période=2006 et compa=2008 donne l'année 2006 superposée sur l'année 2008. 

/////////////// prgm indicateur /////////////////
once a=0
if year>=periode then
    a=a+1
endif
if year=compa  then
    a=a-1
    c=close[a]
else
    c=undefined
endif
dif= (c-c[1])/c[1]
if year=compa and year[1]<>compa then
    gg=1
    base=100
else
    gg=dif+1
    base=base[1]*gg
endif
return base

/////////////// prgm sur les prix /////////////////
once a=0
if year>=periode then
    a=a+1
endif
if year=compa  then
    a=a-1
    c=close[a]
else
    c=undefined
endif
return c
Par hk_lisse - Publié dans : Indicateurs
Voir les 0 commentaires
Lundi 15 décembre 2008 1 15 /12 /Déc /2008 15:43

Over / Under Divergence : Part II.

Voici donc la version baissière de "l'Over / Under Divergence".  Le premier article se trouve ICI (avec les conditions de validation).
Le screener a sorti GDI sur le NYSE, dont voici une vue :



Et le code pour Prorealtime :

x=stochastic[7,3](close)
z=stochastic[21,10](close)
if x>x[1] then
    hi=max(hi,x)
    hico=max(hico,max(high,high[1]))
endif
if x<x[1] and x[1]>x[2] then
    zt1=zt
    zt=z[1]
    sto2=sto1
    sto1=hi
    hi=0
    p3=p1
    p2=max(p1,hico)
    p1=max(highest[3](high),hico)
    if p2=p1 then
        p2=max(p3,p4)
    endif
    hico=0
    hico1=0
endif
if x<x[1] then
    p4=hico1
    hico1=max(hico1,high)
endif
c1=(p1>p2 and sto1<sto2 and x<x[1] and x[1]>x[2])
c2=(c1 and sto2>zt1 and sto1<zt)
if c2 and high[1]=highest[7](high) and low<low[1] and close<open then
    divi=3
else
    divi=0
endif
return divi
Par hk_lisse - Publié dans : Les Divergences
Voir les 0 commentaires
Dimanche 14 décembre 2008 7 14 /12 /Déc /2008 10:47

Divergences baissières Stochastic et MACD.

A la demande de Jean-Michel, voici les codes convertis pour les divergences baissières Stochastic et MACD.  Le premier article, sur les divergences haussières, se trouve ICI.
Voici une vue de ADM, détectée par le screener :



Et les codes pour Prorealtime :

//////////////// divergence baissière stochastic ////////////////
x=stochastic[14,3](close)
y=average[5](x)
if x>y then
    hi=max(hi,x)
    hico=max(hico,max(high,high[1]))
endif
if x crosses under y then
    sto2=sto1
    sto1=hi
    hi=0
    p3=p1
    p2=max(p1,hico1)
    p1=max(highest[3](high),hico)
    if p2=p1 then
        p2=max(p3,p4)
    endif
    hico=0
    hico1=0
endif
if x<y then
    p4=hico1
    hico1=max(hico1,high)
endif
if p1>p2 and sto1<sto2 and x crosses under y and x<x[1] then
    sign=10
else
    sign=0
endif
return sign

///////////// divergence baissière MACD /////////////
m=macdline[9,19,6](close)
s=exponentialaverage[6](m)
if m>s then
    hi1=max(hi1,m)
    hico=max(hico,high)
endif
if m<s then
    hico1=max(hico1,high)
endif
if m crosses under s then
    a=hi1
    hi1=0
    c=max(hico,hico1)
    hico=0
    hico1=0
    a1=a0
    a0=a
    c1=c0
    c0=c
endif
if m crosses under s and a0<a1 and c0>c1 then
    sign=1
else
    sign=0
endif
maxmac=highest[4](m)
maxco=highest[5](high)
if m>s and maxco>c0 and maxmac<a0 then
    pre=.5
else
    pre=0
endif
return sign,pre
Par hk_lisse - Publié dans : Les Divergences
Voir les 0 commentaires
Mardi 9 décembre 2008 2 09 /12 /Déc /2008 16:27

Boîtes de Darvas et Stratégies.

La stratégie employée par Darvas est une technique de breakout : achat lorsque le haut de la boîte est cassé, à cela on peut encore ajouter des filtres.  J'ai testé le système sur les actions US, celui-ci fonctionne mieux sur celles du Nasdaq que sur celles composant le Dow Jones (question de volatilité, valeur de croissance.....).  La majeure partie des gains s'effectue lors de la période 1999/2000 pour la plupart des valeurs.  Pour une première approche, il n'y a pas de slippage, ni de frais.  Le capital est de 20000, la portion investie de 10000, il n'y a pas de pyramidage.

Il y a comparaison entre les systèmes "bearish" et "bullish", ainsi qu'une variation de la validation de la cassure : par la cloture ou simplement par le high.  La condition de sortie du trade est une cassure par le bas d'une boîte.

Voici une vue de VRSN avec les EC's des différents systèmes :



Une autre vue avec OXY :



Le système 1 est le "bearish" + cloture.
Le système 2 est le "bearish" + high/low.
Le système 3 est le "bullish" + cloture.
Le système 4 est le "bullish" + high/low.

D'une façon générale, le système "bearish" est plus performant.  C'est curieux, j'aurais parié le contraire.  Je n'en ai pas analysé la raison, peut-être les sorties.  Sinon, pas de grosses différences entre les systèmes "cloture" et "high/low".  Suivant le support, c'est tantôt l'un, tantôt l'autre.

Voici les codes pour Prorealtime :

//////////////// système 1 /////////////////
if box=1 and (high>tth or low<ttl) then
    box=0
    flag=0
endif
if box=0 and flag=0 and low>low[3] and low[1]>low[3] and low[2]>low[3] then
    th=low[3]
    flag=1
endif
if flag=1 and box=0 and low<th then
    flag=0
endif
if flag=1 and box=0 and high<high[3] and high[1]<high[3] and high[2]<high[3] then
    tth=high[3]
    ttl=th
    box=1
endif
once tth=undefined
once ttl=undefined
if close>tth then
    buy 50 %CAPITAL at market thisbaronclose
endif
if close<ttl then
    sell at market thisbaronclose
endif

//////////////////// système 2 ////////////////
if box=1 and (high>tth or low<ttl) then
    box=0
    flag=0
endif
if box=0 and flag=0 and low>low[3] and low[1]>low[3] and low[2]>low[3] then
    th=low[3]
    flag=1
endif
if flag=1 and box=0 and low<th then
    flag=0
endif
if flag=1 and box=0 and high<high[3] and high[1]<high[3] and high[2]<high[3] then
    tth=high[3]
    ttl=th
    box=1
endif
once tth=undefined
once ttl=undefined
buy 50 %capital at tth stop
sell at ttl stop

////////////////// système 3 ///////////////////
if box=1 and (high>tth or low<ttl) then
    box=0
    flag=0
endif
if box=0 and flag=0 and high<high[3] and high[1]<high[3] and high[2]<high[3] then
    th=high[3]
    flag=1
endif
if flag=1 and box=0 and high>th then
    flag=0
endif
if flag=1 and box=0 and low>low[3] and low[1]>low[3] and low[2]>low[3] then
    ttl=low[3]
    tth=th
    box=1
endif
once tth=undefined
once ttl=undefined
if close>tth then
    buy 50 %CAPITAL at market thisbaronclose
endif
if close<ttl then
    sell at market thisbaronclose
endif

////////////////// système 4 ///////////////////
if box=1 and (high>tth or low<ttl) then
    box=0
    flag=0
endif
if box=0 and flag=0 and high<high[3] and high[1]<high[3] and high[2]<high[3] then
    th=high[3]
    flag=1
endif
if flag=1 and box=0 and high>th then
    flag=0
endif
if flag=1 and box=0 and low>low[3] and low[1]>low[3] and low[2]>low[3] then
    ttl=low[3]
    tth=th
    box=1
endif
once tth=undefined
once ttl=undefined
buy 50 %CAPITAL at tth stop
sell at ttl stop

Remarque : si vous voulez afficher pour contrôle, l'indicateur utilisé, il faut ajouter "return tth, ttl" à la place des instructions d'achat/vente.
Par hk_lisse - Publié dans : Prorealtime Backtest
Voir les 0 commentaires
 
Créer un blog gratuit sur over-blog.com - Contact - C.G.U. - Rémunération en droits d'auteur - Signaler un abus - Articles les plus commentés