Skip to content

Instantly share code, notes, and snippets.

@liezl200
Created October 17, 2014 05:14
Show Gist options
  • Save liezl200/e85e90d28992be28b19e to your computer and use it in GitHub Desktop.
Save liezl200/e85e90d28992be28b19e to your computer and use it in GitHub Desktop.
def defineBenchmark(securities):
put into benchmark table somehow
> id, name
for(sec in securities):
#iterate
if not in mastersecurities, add to that table
> generate id w/ sequence, security name
else if it is, get the id
add new row to benchmark_security for current benchmark
> benchmark id,security id, security weight (whatever is mapped to sec)
def getBenchmarkReturns(benchmark, timerange, cumulative):
getBenchmark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment