aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Makefile9
-rw-r--r--python/TAGS64
2 files changed, 41 insertions, 32 deletions
diff --git a/python/Makefile b/python/Makefile
index bfd33b13..5985dd46 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -2,13 +2,16 @@ CFLAGS=-O2 -march=native -fpic
LDLIBS=-lm -llapack
LDFLAGS=-fpic -shared
-GHquad.so: GHquad.o
- $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
-
tests:
cd tests; \
python -m unittest discover -v
+tags:
+ ctags -e -R .
+
+GHquad.so: GHquad.o
+ $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
clean:
rm -f GHquad.o GHquad.so
diff --git a/python/TAGS b/python/TAGS
index f9334794..18b0b9fe 100644
--- a/python/TAGS
+++ b/python/TAGS
@@ -451,35 +451,41 @@ def interpvalues(w, v, neww):interpvalues67,1951
b = np.array([2.5, 3.3])b102,2878
test = KLfit(P, w, b)test103,2907
-option_trades.py,1573
-import datetimedatetime1,0
-import mathmath2,16
-import numpy as npnp3,28
-import pandas as pdpd4,47
-from pandas.tseries.offsets import BDayBDay6,68
-from arch import arch_modelarch_model7,108
-from db import dbenginedbengine8,136
-from scipy.interpolate import interp1dinterp1d9,160
-from analytics import IndexIndex10,199
-serenitasdb = dbengine('serenitasdb')serenitasdb12,228
-def get_daily_pnl(index, series, tenor, coupon=1):get_daily_pnl14,267
-def daily_spreads(index, series, tenor):daily_spreads24,807
-def index_returns(date=None, years=3, index="IG", tenor="5yr"):index_returns40,1345
-def realized_vol(index, series, tenor, date=None, years=None):realized_vol54,2021
-def atm_vol_fun(v, ref_is_price=False, moneyness=0.2):atm_vol_fun63,2413
-def atm_vol(index, series, moneyness=0.2):atm_vol69,2734
-def atm_vol_date(index, date):atm_vol_date86,3608
-def rolling_vol(df, col='atm_vol', term=[3]):rolling_vol104,4562
- def aux(s, col, term):aux107,4724
-def vol_var(percentile=0.99, index='IG'):vol_var118,5202
-def lr_var(res):lr_var125,5455
-def index_rolling_returns(date=None, years=3, index="IG", tenor="5yr"):index_rolling_returns130,5655
-def get_index_spread(index, series, date, conn):get_index_spread141,6209
-def get_option_pnl(strike, expiry, index, series, start_date, engine):get_option_pnl153,6603
-def sell_vol_strategy(index="IG", months=3):sell_vol_strategy178,7869
- d1 = sell_vol_strategy(months=1)d1199,8868
- d2 = sell_vol_strategy(months=2)d2200,8905
- d3 = sell_vol_strategy(months=3)d3201,8942
+option_trades.py,1959
+import cvxpycvxpy1,0
+import datetimedatetime2,13
+import mathmath3,29
+import numpy as npnp4,41
+import pandas as pdpd5,60
+from pandas.tseries.offsets import BDayBDay7,81
+from arch import arch_modelarch_model8,121
+from db import dbenginedbengine9,149
+from scipy.interpolate import interp1dinterp1d10,173
+from analytics import IndexIndex11,212
+serenitasdb = dbengine('serenitasdb')serenitasdb13,241
+def get_daily_pnl(index, series, tenor, coupon=1):get_daily_pnl15,280
+def daily_spreads(index, series, tenor):daily_spreads25,820
+def index_returns(date=None, years=3, index="IG", tenor="5yr"):index_returns41,1358
+def realized_vol(index, series, tenor, date=None, years=None):realized_vol55,2034
+def atm_vol_fun(v, ref_is_price=False, moneyness=0.2):atm_vol_fun64,2426
+def atm_vol(index, series, moneyness=0.2):atm_vol70,2747
+def atm_vol_date(index, date):atm_vol_date87,3621
+def rolling_vol(df, col='atm_vol', term=[3]):rolling_vol105,4575
+ def aux(s, col, term):aux108,4737
+def vol_var(percentile=0.99, index='IG'):vol_var119,5215
+def lr_var(res):lr_var126,5468
+def index_rolling_returns(date=None, years=3, index="IG", tenor="5yr"):index_rolling_returns131,5668
+def get_index_spread(index, series, date, conn):get_index_spread142,6222
+def get_index_ref(index, series, date, expiry, conn):get_index_ref154,6616
+def get_strike(index, series, date, expiry, conn):get_strike167,7117
+def get_option_pnl(strike, expiry, index, series, start_date, engine):get_option_pnl180,7575
+def sell_vol_strategy(index="IG", months=3):sell_vol_strategy212,9417
+def aggregate_trades(d):aggregate_trades243,10890
+def compute_allocation(df):compute_allocation250,11034
+ d1 = sell_vol_strategy(months=1)d1275,11817
+ d2 = sell_vol_strategy(months=2)d2276,11854
+ d3 = sell_vol_strategy(months=3)d3277,11891
+ all_tenors = pd.concat([aggregate_trades(d) for d in [d1, d2, d3]], axis=1)all_tenors278,11928
mailing_list.py,1332
import smtplibsmtplib1,0