This GraphGist will begin to explore how stock option data can be modeled as a graph, some simple Cypher queries for calculating payout at expiration for an options contract and a very basic look at finding profitable options trades given a specific forecast. Please note that some of the concepts here have been simplified and are only meant as an educational overview of exploring Neo4j and graph data modeling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH n | |
OPTIONAL MATCH n-[r]->() | |
DELETE n,r; | |
LOAD CSV FROM 'https://dl.dropboxusercontent.com/u/67572426/persons.csv' AS line | |
MERGE (p:Person:Entity {name: line[0]}); | |
LOAD CSV FROM 'https://dl.dropboxusercontent.com/u/67572426/orgs.csv' AS line | |
MERGE (o:Org:Dept:Entity {name: line[0]}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import Federal Election campaign contribution data into Neo4j | |
// /path/to/neo4j/bin/neo4j-shell < FEC-2015.cql | |
//first let us create indexes! | |
CREATE INDEX ON :Candidate(fullName); | |
CREATE INDEX ON :Candidate(lastName); | |
CREATE INDEX ON :Candidate(candidateID); | |
CREATE INDEX ON :Contributor(fullName); | |
CREATE INDEX ON :Contributor(occupation); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "Simple_ODEs_Conservation" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "Coffee_Cooling" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder