Skip to content

Instantly share code, notes, and snippets.

'''
@date Jan 17, 2010
@author: mjbommar (c) 2010
Free to use for non-commerical purposes. Attribution appreciated :)
'''
import igraph
import Image, ImageDraw
import os, os.path
'''
Created on Jan 17, 2010
@author: mjbommar
'''
from GraphMovie import GraphMovie
import igraph
if __name__ == "__main__":
'''
'''
Created on Jan 17, 2010
@author: mjbommar
'''
from GraphMovie import GraphMovie
import igraph, igraph.colors
import copy
if __name__ == "__main__":
'''
@author Michael J Bommarito II
@date Mar 2, 2010
This file can determine the average pairwise stability for
a dynamic graph. Growing graphs, constant vertex count graphs, and
even graphs with deleted vertices are supported.
It supports the following methods:
* betweenness
/*
* kappa.c
* Michael J Bommarito II - michael.bommarito@gmail.com
* http://www.etf-central.com/
* Sept. 09, 2007
*
* Calculate general Kappa function
* http://corporate.morningstar.com/uk/documents/MethodologyDocuments/ResearchPapers/KappaADownsideRisk_AdjustedPerformanceMeasure_PK.pdf
*/
/*
* kappaCX.c - enhanced vector inputs
* Michael J Bommarito II - michael.bommarito@gmail.com
* http://www.etf-central.com/
* Sept. 12, 2007
*
* Calculate general Kappa function
* http://corporate.morningstar.com/uk/documents/MethodologyDocuments/ResearchPapers/KappaADownsideRisk_AdjustedPerformanceMeasure_PK.pdf
*/
'''
@author Michael J Bommarito II
@date Mar 4, 2010
'''
import igraph
from pairwiseStability import *
'''
Create G, the list of graphs over time.
'''
@author Michael J Bommarito II
@date Mar 20, 2010
mjbommar@cluster1:~$ time python -O mapVF2.py 1
Undirected graph (|V| = 50, |E| = 294)
[240, 564, 4248, 97392, 137788, 560468, 6871224, 164328, 4528, 284, 50]
real 0m4.000s
user 0m3.960s
'''
@author Michael J Bommarito II
@date Mar 26, 2010
This is just a cute little example of an asset graph with the max and min spanning trees highlighted.
'''
import dateutil.parser
import csv
import igraph
% Author: Michael J. Bommarito II
% Contact: michael.bommarito@gmail.com
% Date: Oct 3, 2010
% Provided as-is, informational purposes only, public domain.
%
% Inputs:
% 1. dataMatrix: variables (X1,X2,...,X_M) in the columns
% 2. windowSize: number of samples to include in the moving window
% 3. indexColumn: the variable X_i against which correlations should be
% returned