Feeds:
Posts

## DONOHO’S BESOV SIGNAL RECOVERY FROM NOISE FOR LAPLACIAN EIGENVECTOR COMPONENTS OF VOLATILITY

Lest you feel that I hate women, I don’t.  They are both angelic and demonic, like me.  I was just stupid and young and did not think women that I love would have the vampyre demon in them to use me and destroy my life and pretend that it’s ok and not have to pay.  Anyway, it’s all water under the bridge and I have recovered my senses enough not to smash any faces with baseball bats out of anger.  In fact, I am an Angel of Mercy for never doing any physical harm.  Many people deserve to have their faces bust with a baseball bat.  Instead, I’ve been angelic enough to use this immense reservoir of anger for something decent.  I’ll create a new science of finance out of actual market data and new mathematical ideas and forget the bitches.  They can dig their own graves seeking happiness when they cannot love.  Fuck them all.  Fucking whores and cunts all of the lot.  Once in a while you think you’ve met someone different and kaboom, reality hits you like a snap — nope another one bites the dust.

Anyway.  so you get the market data for 1900 stocks.  Then use the standard stochastic volatility model which has a long complicated name for the fundamental model which is simple.  Daily returns are modeled as
r_t = sigma_t * whitenoise
where you let h_t be the noisy volatility, with epsilon=10e-6, take
h_t = log( r_t^2 + expsilon)
Now you have a big table with n=1900 columns.  Now construct the graph of the market representing the entire financial structure of the world using
C<-matcov(h)
where
matcov<-function( x ) {
n<-dim(x)[2]
C<-matrix(0,nrow=n,ncol=n)
for (i in 1:n){
for (j in 1:i){
v<-cov(x[,i],x[,j])
C[i,j]<-v
C[j,i]<-v
}
}
C
}
(You can just dump these copy-paste into R and they will work)

Then you want to create the graph as follows:

A<-abs(C-diag(C))-0.5*sd(C)

This will give you a denoised covariance matrix (assuming 0.5*sd(C) is noise without a diagonal which is perfect for drawing edges between assets and essentially giving us the path of spread of the poison of money.

Then just make it an adjacency matrix
A[A<0]<-0
A[A>0]<-1
Now create a graph and then take the laplacian matrix because our various gyrations and rhetorical flourish is ultimately based on recognition that for dynamical systems on graphs, especially partial differential equations which are quasilinear with a nonlinear convection term which are studied in great generality by PDE theorists in which falls the famous Navier-Stokes equations of hydrodynamics,
library(igraph)
H<-graph.laplacian(graph)
E<-eigen(H)
Now the simple way of getting the original data into components of laplacian eigenvectors is
eh<-h %*% E\$vectors

Now you just denoise using Donoho’s theory of optimal recovery of Besov signals.  With R wavelet functions you want to have a stupid expand.dyadic function that just creates a vector of length power of 2 so that all these wavelet libraries don’t croak.  It’s the annoyance of open source I leave this as an exercise for the reader.
library(wavethresh)
# the following code does the Donoho-Johnstone thresholding row-by-row.
matwt<-function( m ){
r<-dim(m)[1]
c<-dim(m)[2]
for (b in 1:r){
wx<-wd(x)
wxt<-threshold(wx)
xr<-wr(wxt)
}

Next we take the denoised volatility of the market

clean.h<-matwt( eh)

and now we have an object which we want to fit a DYNAMICAL SYSTEM model that is analogous to the Navier-Stokes equation.  We know that physicists have dicovered cascading and scaling and other effects in their massive tick-by-tick analyses.  This is a different perspective.  This uses free daily data with a GLOBAL perspective.   Our aim is to discover dynamic models of the global volatility using the space variable we created through this market graph.

This is still a conjectural approach, but it would be very good to have theory for this in multiple directions.  David Donoho has pointed me to the statistical models of graphs themselves by Patrick Wolfe and others.  These statistical models of graphs are very very useful to modeling volatility dynamics in a global scale because they tell us about infinite n limits in assets. Another issue of interest is the dynamics of quasilinear parabolic equaitons (Laplacian is just a matrix on a graph so these are ODE systems in n variables on a graph) with a nonlinear convection term like power laws.  You can find these in this good book: