[tech-spec] Re: [SPEC-LIST] Dragnet 1166 redux

  • From: James Sogi <jsogi@xxxxxxxxxxxxx>
  • To: tech-spec@xxxxxxxxxxxxx
  • Date: Thu, 04 Nov 2004 11:30:39 -1000

James Sogi wrote:

Tuesday, September 21, 2004.
Spx first hit 1130  April 1998.
Since then the mean price is 1166.
"Officer, do you think we'll hit 1166 soon?"...
Sgt. Friday ..."Just the facts Ma'am. "


It is not out of mere arrogance and perversity that I, an individual poor man, have taken to address your lordships... We must remember that in this matter we wrestle not against flesh and blood, but against the rulers of the darkness of this world. who may fill this world with war and bloodshed, but cannot themselves be overcome thereby. (from Machiavelli Address to Nobility)

With 1166 a hair away , I thought I'd revisit my query regarding the question of the expanding range with reversal or capitulation of the losing half and the possibility of new trend reassertion. (Query?( Republican=bulls - Democrat=bears)=new trend?)

Revisiting my Wiz supercharged vix study on 20 day vix new lows we had 11/4 vix close of 13.98, with a low vix of 12.95 vs 14.50 on 10/7.
Data is at http://home.hawaii.rr.com/zephyr/vix.csv


> info<- function(O) list(head(O),tail(O))
> lead<- function(O,N) c(diff(O,N),rep(NA,N))
> SOGI<- read.csv("http://home.hawaii.rr.com/zephyr/vix.csv",header=T)
> SOGI<- SOGI[-(1:3)]; info(SOGI)
[[1]]
 D W     SP   VIX
1 2 2 894.05 12.19
2 3 3 895.90 12.10
3 4 4 888.75 13.78
4 5 5 888.25 13.58
5 8 1 891.35 13.11
6 9 2 877.45 15.21

[[2]]
     D W     SP   VIX
2223 28 4 112750 15.39
2224 29 5 113025 16.27
2225  1 1 113075 16.27
2226  2 2 113050 16.18
2227  3 3 114500 14.04
2228  4 4 115700 13.45

> SOGI<- transform(SOGI,SP10AHD=lead(SP,10)) # add SP 10 dy ahead
> MINALL<- SOGI$VIX==running(SOGI$VIX,,min,20,pad=T) # all VIX mins
> MINNEW<- MINALL&(running(MINALL,,sum,20,pad=T)==1) # fresh VIX mins
> OBSALL<- SOGI[MINALL,]; tail(OBSALL)
     D W       SP   VIX  SP10AHD
2185  3 5   1114.4 13.91 111110.6
2189 10 5   1123.4 13.76 110026.6
2190 13 1 112825.0 13.17  -2300.0
2204  1 5 113325.0 12.75  -2500.0
2227  3 3 114500.0 14.04       NA                     (yesterday?)
2228  4 4 115700.0 13.45       NA                      (today?)
> cat('NumObs is '); nrow(OBSALL); summary(OBSALL$SP10AHD)
NumObs is [1] 288
    Min.   1st Qu.    Median      Mean   3rd Qu.      Max.      NA's
-2500.00    -21.13     -0.60   1646.00     23.55 111800.00     21.00
> cat('NumObs is '); nrow(OBSALL); summary(OBSALL$SP10AHD)
NumObs is [1] 288
    Min.   1st Qu.    Median      Mean   3rd Qu.      Max.      NA's
-2500.00    -21.13     -0.60   1646.00     23.55 111800.00     21.00
> cat('NumObs is '); nrow(OBSNEW); summary(OBSNEW$SP10AHD)
NumObs is [1] 61
  Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
-77.000 -18.600   5.650   1.313  25.850  74.100  20.000
>


As you can see something wierd happened to my date results when I updated my data and I don't know how to fix output, a correction would really help. Looks like it is picking up row numbers not dates. Also gregmisc seems to have been updated to 2.0 which changes things in some way unknown to me.. Thanks Jim.


Wiz's script woked fine when he first did it, til I screwed something up, is as follows,

version; rm(list=ls()); require('gregmisc') # need for running
info<- function(O) list(head(O),tail(O))
lead<- function(O,N) c(diff(O,N),rep(NA,N))
SOGI<- read.table("http://dailyspeculations.com/SOGI.txt",header=T)
SOGI<- SOGI[-(1:3)]; info(SOGI)
SOGI<- transform(SOGI,SP10AHD=lead(SP,10)) # add SP 10 dy ahead
MINALL<- SOGI$VIX==running(SOGI$VIX,,min,20,pad=T) # all VIX mins
MINNEW<- MINALL&(running(MINALL,,sum,20,pad=T)==1) # fresh VIX mins
OBSALL<- SOGI[MINALL,]; tail(OBSALL)
cat('NumObs is '); nrow(OBSALL); summary(OBSALL$SP10AHD)
OBSNEW<- SOGI[MINNEW,]; tail(OBSNEW);
cat('NumObs is '); nrow(OBSNEW); summary(OBSNEW$SP10AHD)




Other related posts:

  • » [tech-spec] Re: [SPEC-LIST] Dragnet 1166 redux