Carteras Blog        Login      Registrarse        

Síguenos en:   RSS   Facebook  Twitter   Linkedin   

Resultados 1 al 30 de 30
Like Tree13Likes
  • 3 Post By mbolsia
  • 6 Post By mbolsia
  • 6 Post By mbolsia
  • 3 Post By mbolsia
  • 6 Post By mbolsia
  • 3 Post By mbolsia
  • 3 Post By mbolsia
  • 3 Post By BolsiaSicav
  • 3 Post By LeoCV
  • 3 Post By mbolsia

Tema: The Trend is my Friend

Ver modo hilado

Mensaje anterior Mensaje anterior   Próximo mensaje Próximo mensaje
  1. #26
    Administrator Avatar de mbolsia
    Fecha de ingreso
    16 nov, 11
    Mensajes
    3,791
    Thanks
    573
    Thanked 620 Times in 510 Posts
    Poder de reputación
    10

    Re: The Trend is my Friend

    Se me rompió el disco duro y perdí muchas cosas que estaba haciendo, lamento no haber continuado con el tema. Pero volvemos a la carga, de hecho estoy buscando el sistema del VIX, me hago mayor y la memoria se va borrando.

    Ahora hemos visto claramente que el mercado ha cambiado y hay que estar muy atento a lo que pueda venir.

    Test de Chow

    Pulsa en la imagen para verla en tamaño completo

Nombre: test.png
Visitas: 36
Tamaño: 25.9 KB
ID: 9450


    The Chow test tells you if the regression coefficients are different for split data sets. Basically, it tests whether one regression line or two separate regression lines best fit a split set of data.


    Running the Test

    The null hypothesis for the test is that there is no break point (i.e. that the data set can be represented with a single regression line).

    Run a regression for the entire data set (the “pooled regression”). Collect the error Sum of Squares data.
    Run separate regressions on each half of the data set. Collect the Error Sum of Squares data for the two regressions.


    Calculate the Chow F statistic using the SSE from each subsample. The formula is: chow-test-formula

    Pulsa en la imagen para verla en tamaño completo

Nombre: formula.png
Visitas: 37
Tamaño: 2.8 KB
ID: 9451


    where:
    RSSp = pooled (combined) regression line.
    RSS1 = regression line before break.
    RSS2 = regression line after break.
    Find the F-critical value from the F-table.
    Reject the null hypothesis if your calculated F-value falls into the rejection region (i.e. if the calculated F-value is greater than the F-critical value).

    Este test sirve de una manera cuantitativa saber cuando la tendencia se ha terminado, aunque como se basa en datos pasados, siempre suele llegar tarde. Ahora bien en una tendencia de años es una manera fácil de buscar valores con tendencia.


    Test de Chow en R

    Código PHP:
    ## Run three regressions (1 restricted, 2 unrestricted)
    r.reg lm(waiting eruptionsdata of)
    ur.reg1 lm(waiting eruptionsdata of[of$eruptions 3.25,])
    ur.reg2 lm(waiting eruptionsdata of[of$eruptions
    ## review the regression results
    summary(reg.r)
    summary(ur.reg1)
    summary(ur.reg2)
     
    ## Calculate sum of squared residuals for each regression
    SSR NULL
    SSR$r 
    r.reg$residuals^2
    SSR$ur1 
    ur.reg1$residuals^2
    SSR$ur2 
    ur.reg2$residuals^2
     
    ## K is the number of regressors in our model
    r.reg$rank
     
    ## Computing the Chow test statistic (F-test)
    numerator = ( sum(SSR$r) - (sum(SSR$ur1) + sum(SSR$ur2)) ) / K
    denominator 
    = (sum(SSR$ur1) + sum(SSR$ur2)) / (nrow(of) - 2*K)
    chow numerator denominator
    chow
     
    ## Calculate P-value
    1-pf(chowK, (nrow(of) - 2*K)) 
    https://thetarzan.wordpress.com/2011...ithful-geyser/


    https://pythonandr.com/tag/structural-breaks/

    Pulsa en la imagen para verla en tamaño completo

Nombre: chown.png
Visitas: 0
Tamaño: 75.7 KB
ID: 9452
    Última edición por mbolsia; 13/02/2018 a las 23:30

Información de tema

Usuarios viendo este tema

Actualmente hay 1 usuarios viendo este tema. (0 miembros y 1 visitantes)

Marcadores

Permisos de publicación

  • No puedes crear nuevos temas
  • No puedes responder temas
  • No puedes subir archivos adjuntos
  • No puedes editar tus mensajes
  •