exploration/tranches.py,281 import analytics.tranche_functions as tchtch4,74 import analytics.tranche_basket as bktbkt5,116 import analytics.basket_index as idx_bktidx_bkt6,155 import numpy as npnp7,196 import pandas as pdpd8,215 def rv_calc1():rv_calc118,593 def dispersion():dispersion70,2851 exploration/test_mlp.py,57 import pandas as pdpd1,0 def get_conn():get_conn6,97 exploration/hy_flattener.py,46 from matplotlib import pyplot as pltplt3,56 exploration/beta_trade.py,525 import pandas as pdpd5,55 import numpy as npnp13,253 import matplotlib.pyplot as pltplt17,356 def calc_returns(index_list=['HY', 'IG'], save_feather=False):calc_returns19,389 def calc_betas(returns=None, spans=[5, 20], index_list=['HY', 'IG']):calc_betas30,916 def plot_betas(betas=None):plot_betas40,1312 def calc_realized_vol(returns=None):calc_realized_vol50,1576 def spreads_ratio(series=list(range(22, 29)), index=['IG', 'HY'], tenor='5yr'):spreads_ratio73,2461 def loglik(beta, returns):loglik79,2726 exploration/marketing.py,417 import numpy as npnp2,66 import pandas as pdpd3,85 import matplotlib as pltplt4,105 def run_scenario(pool_size, rho, successprob, issuerweights, amount):run_scenario8,147 def plot_scenarios(df, bins = [0,0.1, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 2000]):plot_scenarios17,553 def stats(df):stats37,1333 def plot_prob_over(df):plot_prob_over44,1565 def add_to_plot(df, ax):add_to_plot51,1763 exploration/backtest.py,185 import pandas as pdpd2,24 import numpy as npnp3,44 def calc_mark_diff():calc_mark_diff5,64 def closest(s):closest12,385 def avg_minus_maxmin(s):avg_minus_maxmin20,592 exploration/VaR.py,107 import pandas as pdpd5,136 def hist_var(portf, index_type="IG", quantile=0.05, years=5):hist_var13,253 exploration/test_scenarios.py,54 import numpy as npnp1,0 import pandas as pdpd2,19 exploration/test_swaption.py,77 def theta(swaption):theta27,1117 def dv01(swaption, helpers):dv0135,1306 exploration/option_trades.py,1020 import numpy as npnp4,41 import pandas as pdpd5,60 def realized_vol(index, series, tenor='5yr', date=None, years=None, return_type='spread'):realized_vol16,349 def lr_var(res):lr_var29,1048 def atm_vol_calc(df, index_type, moneyness):atm_vol_calc42,1443 def atm_vol(index, date, series=None, moneyness=0.2):atm_vol75,3123 def rolling_vol(df, col='atm_vol', term=[3]):rolling_vol91,3914 def aux(s, col, term):aux95,4128 def vol_var(percentile=0.975, index='IG', start_date=datetime.date(2014, 6, 11)):vol_var106,4606 def get_index_spread(index, series, date, conn):get_index_spread119,5093 def get_index_ref(index, series, date, expiry, conn):get_index_ref131,5487 def get_option_pnl(strike, expiry, index, series, start_date, engine):get_option_pnl144,5988 def sell_vol_strategy(index="IG", months=3):sell_vol_strategy179,7669 def aggregate_trades(d):aggregate_trades205,8976 def compute_allocation(df):compute_allocation211,9119 import statsmodels.formula.api as smfsmf244,10361 exploration/portfolio_example.py,57 import pandas as pdpd4,176 import numpy as npnp5,196 exploration/vcube.py,260 import pandas as pdpd6,149 def ticker(expiry, tenor, spread, vol_type, source):ticker12,287 def get_tickers(vol_type="V", source="GFIS"):get_tickers24,719 def to_tenor(s):to_tenor32,985 def get_vol_cube(conn, date, source='GFIS'):get_vol_cube36,1075 exploration/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 exploration/realized_vol_quantiles.py,39 def implied_vol(q):implied_vol13,476 exploration/portfolio_var.py,469 import numpy as npnp7,223 import pandas as pdpd8,242 import exploration.curve_trades as cvcv12,291 def on_the_run(index):on_the_run17,397 def rel_spread_diff(report_date = datetime.date.today(), index='HY', rolling=10):rel_spread_diff23,600 def get_pos(report_date):get_pos38,1249 def cleared_cds_margins(report_date=datetime.date.today()):cleared_cds_margins49,1712 def index_curve_margins(report_date=datetime.date.today()):index_curve_margins71,2856 exploration/sell_vol.py,41 def get_trades(df, d):get_trades10,338 exploration/test_cms.py,208 import pandas as pdpd8,214 def lmcg_navs(trade_id):lmcg_navs13,288 def gs_navs(trade_id, orig_nav):gs_navs25,607 def ms_navs(trade_id="JWY3N"):ms_navs54,1599 def myfun(corr, args):myfun100,3216 test_dispersion.py,0 cds_rebook.py,208 def get_outstanding_positions(trade_date, fcm):get_outstanding_positions9,231 def default_adjustment(company_id, end_date):default_adjustment22,669 def rebook(trade_date, company_id, fcm):rebook44,1249 xmltotab.py,0 Makefile,201 CFLAGS=-O2 -march=native -fpicCFLAGS1,0 LDLIBS=-lm -llapackLDLIBS2,31 LDFLAGS=-fpic -sharedLDFLAGS3,51 tests:tests5,74 tags:tags9,127 GHquad.so: GHquad.oGHquad.so12,185 clean:clean15,243 quote_parsing/.pytest_cache/README.md,54 # pytest cache directory #pytest cache directory1,0 quote_parsing/parse_emails.py,1696 import pandas as pdpd1,0 import psycopg2.sql as sqlsql3,30 def list_imm_dates(date):list_imm_dates13,280 def makedf(r, indextype, quote_source):makedf22,461 def parse_quotedate(fh, date_received):parse_quotedate81,2260 def parse_refline(line):parse_refline107,3198 def parse_baml(fh, index_desc, *args):parse_baml122,3646 def parse_baml_block(fh, indextype):parse_baml_block143,4201 def parse_bnp_block(fh, indextype, skip_header=True):parse_bnp_block160,4667 def parse_cs_block(fh, indextype):parse_cs_block181,5278 def parse_ms_block(fh, indextype):parse_ms_block203,6011 def parse_nomura_block(fh, indextype):parse_nomura_block246,7540 def parse_sg_block(fh, indextype, expiration_dates):parse_sg_block278,8446 def parse_gs_block(fh, indextype):parse_gs_block317,9653 def parse_citi_block(fh, indextype):parse_citi_block354,10679 def parse_ms(fh, index_desc, *args):parse_ms407,12221 def parse_nom(fh, index_desc, *args):parse_nom424,12821 def aux(line, fh, index_desc, option_stack, fwd_index):aux428,12901 def parse_sg(fh, index_desc):parse_sg447,13620 def parse_gs(fh, index_desc):parse_gs461,14056 def parse_citi(fh, index_desc):parse_citi497,15184 def parse_cs(fh, index_desc):parse_cs515,15849 def parse_bnp(fh, index_desc):parse_bnp538,16766 def get_current_version(index, series, d, conn):get_current_version582,18653 def parse_email(email, date_received, conn):parse_email593,18970 def write_todb(swaption_stack, index_data, conn):write_todb653,21579 def gen_sql_str(query, table_name, columns):gen_sql_str654,21629 def get_email_list(date):get_email_list694,23152 def pickle_drop_date(date):pickle_drop_date709,23565 quote_parsing/__main__.py,28 import pandas as pdpd3,31 quote_parsing/tests/test_cs.py,38 def test_subject():test_subject4,40 quote_parsing/tests/__init__.py,0 quote_parsing/download_emails.py,100 def print_citi_html(email):print_citi_html16,307 def save_emails(update=True):save_emails35,869 quote_parsing/__init__.py,0 .pytest_cache/README.md,54 # pytest cache directory #pytest cache directory1,0 database_consistency.py,27 import pandas as pdpd1,0 rmbs/CRT_data.py,189 import pandas as pdpd3,33 import .load_globeop_report as load_globeopload_globeop6,93 def get_CRT_notional():get_CRT_notional10,159 def calc_CRT_notional():calc_CRT_notional36,1221 rmbs/marketing.py,183 import pandas as pdpd1,0 def ver_one():ver_one6,87 def plot_strat():plot_strat29,1253 import seaborn as snssns31,1272 def wavg(group, avg_name, weight_name):wavg54,2014 compute_price.py,0 mark_backtest_underpar.py,978 import pandas as pdpd1,0 import numpy as npnp3,38 import matplotlib.pyplot as pltplt4,57 import statsmodels.api as smsm5,89 import seaborn as sbsb7,158 import globeop_reports as opsops11,237 def get_mark_df(asset_class = 'Subprime'):get_mark_df13,268 def calc_mark_diff(df, sources= ['PRICESERVE', 'PRICINGDIRECT','BVAL','MARKIT','BROKER', 'REUTERcalc_mark_diff27,1083 def closest(x):closest53,2307 def remove_max_min(x):remove_max_min60,2514 def diff_by_source(df):diff_by_source66,2655 def diff_by_source_percentage(df):diff_by_source_percentage75,3063 def count_sources(df):count_sources82,3273 def alt_navs():alt_navs88,3566 def annual_performance(nav_100):annual_performance102,4267 def alt_nav_impact():alt_nav_impact108,4459 def back_test(begindate = '2013-01-01', enddate = '2018-01-01', sell_price_threshold = 200):back_test115,4649 def stats(df_long, diff_threshold = 5):stats136,5949 def pretty_plot(df_long):pretty_plot147,6308 populate_risk_numbers.py,209 def get_index_list(basedir):get_index_list6,98 def get_attach_from_name(index_type, series):get_attach_from_name16,559 def convert(s):convert33,1066 def populate_risk(basedir, db):populate_risk36,1124 task_server/rest.py,238 def get_db():get_db13,280 def get_queue():get_queue23,582 def close_db(error):close_db31,767 def intex():intex39,948 def globeop():globeop46,1117 def insert_tranches():insert_tranches54,1401 def run_tasks():run_tasks60,1513 task_server/__main__.py,0 task_server/config.py,0 task_server/insert_tranche_quotes.py,138 def convert(x):convert18,504 def convert_int(x):convert_int27,696 def insert_quotes(year=2016, quote_dir=None):insert_quotes40,1065 task_server/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 task_server/globeop.py,691 import pandas as pdpd19,289 def get_ped(s):get_ped25,388 def key_fun(s):key_fun36,692 def run_date(s):run_date47,1001 def get_ftp(folder):get_ftp55,1193 def get_gpg():get_gpg62,1331 def convert_to_csv(f):convert_to_csv74,1696 def download_data(workdate: datetime.date):download_data83,2027 def insert_todb(workdate: datetime.date):insert_todb147,4086 def upload_bond_marks(engine, workdate: datetime.datetime):upload_bond_marks176,5217 def upload_cds_marks(engine, workdate: datetime.datetime):upload_cds_marks195,5912 def upload_data(engine, workdate: datetime.datetime):upload_data211,6509 def back_fill(start_date=pd.datetime(2017, 7, 20)):back_fill216,6644 task_server/README.md,0 task_server/__init__.py,0 adj_index_price.py,28 import pandas as pdpd2,65 build_default_table.py,27 import pandas as pdpd1,0 external_deriv_marks.py,260 import pandas as pdpd2,16 def gs_navs(date: datetime.date = None):gs_navs7,74 def ms_navs(date: datetime.date = None):ms_navs30,964 def citi_navs(date: datetime.date = None):citi_navs48,1663 def baml_navs(date: datetime.date = None):baml_navs76,2676 backfill_index.py,29 import pandas as pdpd4,112 yieldcurve.py,906 import pandas as pdpd8,167 import numpy as npnp20,812 def load_curves(currency="USD", date=None):load_curves28,1002 def get_curve(effective_date, currency="USD"):get_curve49,1707 def getMarkitIRData(effective_date=datetime.date.today(),getMarkitIRData70,2503 def get_futures_data(date=datetime.date.today()):get_futures_data87,3256 def get_curve_params(currency):get_curve_params94,3565 def rate_helpers(currency="USD", MarkitData=None, evaluation_date=None):rate_helpers125,4682 def get_dates(date, currency="USD"):get_dates169,6716 def roll_yc(yc, forward_date):roll_yc186,7504 def YC(helpers=None, currency="USD", MarkitData=None, evaluation_date=None,YC193,7815 def jpYC(effective_date, currency="USD", MarkitData=None):jpYC215,8685 def ql_to_jp(ql_yc):ql_to_jp235,9475 def build_curves(currency="USD"):build_curves246,9928 import matplotlib.pyplot as pltplt286,11920 intex/load_indicative.py,230 def convertToNone(s):convertToNone16,226 def insert_new_cusip(conn, line):insert_new_cusip20,297 def upload_cusip_data(conn, filename):upload_cusip_data65,1690 def upload_deal_data(conn, filename):upload_deal_data147,5057 intex/__main__.py,0 intex/common.py,53 def sanitize_float(intex_float):sanitize_float4,12 intex/load_intex_collateral.py,104 def upload_data(conn, workdate):upload_data44,850 def intex_data(conn, workdate):intex_data216,7681 intex/intex_scenarios.py,307 def get_reinv_assets(conn, dealname, workdate):get_reinv_assets31,810 def get_recovery(conn, dealname, workdate, defaultrecovery=50):get_recovery42,1155 def get_reinvenddate(conn, dealname, workdate):get_reinvenddate61,1835 def generate_scenarios(workdate, dealname, conn):generate_scenarios73,2226 intex/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 intex/__init__.py,0 flask-run.py,0 GHquad.h,0 backtest.py,206 import pandas as pdpd2,16 def set_strikes(payer, receiver):set_strikes9,210 def set_up_strategy(start_date: datetime.date, tenor: 3):set_up_strategy25,582 def backtest(portf, index):backtest42,1190 templates/template-2014-07-16.html,0 templates/template-2015-03-16.html,0 templates/template-2014-06-13.html,0 templates/template-2015-01-14.html,0 templates/template-2014-05-19.html,0 templates/template-2014-08-12.html,0 templates/trading_form.tex,0 templates/template2-2014-04-16.html,0 templates/template-2014-03-17.html,0 templates/template-2014-03-12.html,0 templates/template-2014-11-13.html,0 templates/template-2014-12-11.html,0 templates/template-2014-09-15.html,0 templates/template-2014-04-16.html,0 templates/template-2015-04-20.html,0 templates/template-2014-10-17.html,0 templates/template-2015-02-12.html,0 markit_tranches.py,27 import pandas as pdpd1,0 common.py,99 def sanitize_float(intex_float):sanitize_float6,50 def get_redis_queue():get_redis_queue18,445 pnl_explain.py,618 import numpy as npnp1,0 import pandas as pdpd2,19 def get_daycount(identifier, engine=dbengine("dawndb")):get_daycount7,112 def pnl_explain(identifier, start_date = None, end_date = None,pnl_explain21,578 def pnl_explain_list(id_list, start_date = None, end_date = None, engine = dbengine("dawndb")):pnl_explain_list101,5033 def compute_tranche_factors(df, attach, detach):compute_tranche_factors105,5269 def cds_explain(index, series, tenor, attach = np.nan, detach = np.nan,cds_explain114,5785 def cds_explain_strat(strat, start_date, end_date, engine = dbengine("dawndb")):cds_explain_strat187,9766 markit_tranche_quotes.py,100 def get_latest_quote_id(db):get_latest_quote_id36,925 def convert_float(s):convert_float43,1101 test_quotes.py,184 import pandas as pdpd2,16 def get_refids(index, series, expiry, value_date=datetime.date.today(),get_refids8,138 def adjust_stacks(index_type, series, expiry,adjust_stacks24,769 dawn_utils.py,447 import pandas as pdpd2,10 def create_trigger_function(db):create_trigger_function4,31 def create_triggers(db):create_triggers43,1265 def load_counterparties(engine):load_counterparties52,1614 def load_trades(engine, schema=None):load_trades71,2939 def load_trades_futures(engine, schema=None):load_trades_futures101,4554 def load_wires(engine, schema=None):load_wires136,6442 def load_spots(engine, schema=None):load_spots160,7702 experiments/exchange_example.py,0 experiments/test_timestamptz.py,27 import pandas as pdpd1,0 experiments/test_matrix.py,312 import numpy as npnp1,0 import scipy.linalg as splinalgsplinalg2,19 import dask.array as dada3,51 def get_num_threads():get_num_threads10,216 def set_num_threads(n):set_num_threads13,291 def test():test26,595 def test2():test230,692 def test3():test334,815 def test_dask():test_dask55,1521 experiments/test_dask.py,149 import dask.dataframe as dddd1,0 import numpy as npnp2,28 strip_percent = lambda s: float(s.rstrip('%'))/100 if s else np.nanstrip_percent4,48 experiments/test_basket.py,28 import pandas as pdpd2,36 experiments/test_trace.py,28 import pandas as pdpd2,64 experiments/test_asyncpg.py,235 async def dbconn():dbconn10,184 async def get_singlenames_quotes_async(con, indexname, date):get_singlenames_quotes_async16,394 async def get_curves(con, currency="USD", date=None):get_curves24,744 async def main():main29,1028 experiments/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 experiments/test_async.py,157 async def pomme():pomme3,16 async def poire():poire8,106 async def main():main13,196 async def ping(msg):ping18,275 async def pong(msg):pong26,416 trace_update.py,262 import pandas as pdpd2,64 def get_universe():get_universe7,182 def get_bbg_data(cusips, universe):get_bbg_data12,347 def insert_data(dfs, conn):insert_data22,835 def get_cusips():get_cusips37,1428 def calc_check_digit(number):calc_check_digit44,1624 GHquad.c,56 void GHquad(int n, double* Z, double* w) {GHquad7,167 bbg_helpers.py,547 import pandas as pdpd2,14 def init_bbg_session(ip_list, port=8194):init_bbg_session14,256 def append_overrides(request, d):append_overrides38,1006 def event_loop(session, request):event_loop49,1340 def get_pythonvalue(e):get_pythonvalue63,1823 def field_array_todf(field):field_array_todf80,2304 def process_historical_msg(msg):process_historical_msg92,2569 def process_reference_msg(msg):process_reference_msg99,2822 def process_intraday_tick_msg(msg):process_intraday_tick_msg119,3556 def retrieve_data(retrieve_data124,3688 collateral/__main__.py,27 import pandas as pdpd1,0 collateral/common.py,197 import pandas as pdpd2,15 def compare_notionals(df, positions, fcm: str):compare_notionals8,108 def get_dawn_trades(d, engine):get_dawn_trades25,698 def send_email(d, df):send_email72,2082 collateral/citi.py,413 import pandas as pdpd1,0 def load_file(d):load_file8,143 def download_files(count=20):download_files20,478 def load_pdf(file_path):load_pdf36,944 def get_col(l, top, bottom, left, right):get_col47,1265 def parse_num(s):parse_num58,1499 def get_df(l, col1, col2, col3):get_df66,1631 def get_total_collateral(d):get_total_collateral76,1892 def collateral(d, dawn_trades, *args):collateral104,2804 collateral/baml_isda.py,207 import pandas as pdpd5,92 def download_from_secure_id(download_from_secure_id14,263 def download_files(d=None, count=20):download_files55,1871 def collateral(d, dawn_trades, *args):collateral83,2978 collateral/wells.py,305 import pandas as pdpd1,0 def get_wells_sftp_client():get_wells_sftp_client11,299 def get_wells_sftp_client2():get_wells_sftp_client217,503 def download_files2(d=None):download_files227,801 def download_files(d=None):download_files36,1090 def collateral(d, positions, engine):collateral54,1782 collateral/baml_fcm.py,180 import pandas as pdpd5,128 def get_sftp_client():get_sftp_client9,192 def download_files(d=None):download_files16,452 def collateral(d, positions, engine):collateral25,724 collateral/ms.py,134 import pandas as pdpd1,0 def download_files(count=20):download_files5,46 def collateral(d, dawn_trades, *args):collateral28,778 collateral/gs.py,178 import pandas as pdpd1,0 def download_files(count=20):download_files5,46 def load_file(d, pattern):load_file22,553 def collateral(d, dawn_trades, *args):collateral30,835 collateral/sg.py,187 import pandas as pdpd2,15 def get_sftp_client():get_sftp_client11,155 def download_files(download_files17,360 def collateral(d, engine):collateral63,1802 def f(g):f116,4228 collateral/__init__.py,0 optimization.py,229 import numpy as npnp1,0 import numpy.linalg as lala2,19 def decr_fun(a, b):decr_fun5,94 def KLfit(P, q, b):KLfit8,175 def interpweights(w, v1, v2):interpweights60,1694 def interpvalues(w, v, neww):interpvalues67,1951 calibrate_swaption.py,365 import pandas as pdpd1,0 def get_data(index, series, date=datetime.date.min):get_data15,299 def get_data_latest():get_data_latest32,889 def calib(option, ref, strike, pay_bid, pay_offer, rec_bid, rec_offer):calib51,1526 def MaybePool(nproc):MaybePool82,2553 def calibrate(index_type=None, series=None, date=None, nproc=4, latest=False):calibrate86,2622 test.xml,397 06,208 17,273 28,346 39,419 410,492 env.py,0 markit_red.py,242 import pandas as pdpd9,148 def request_payload(payload):request_payload12,170 def download_report(report):download_report30,749 def update_redcodes(fname):update_redcodes62,1643 def update_redindices(fname):update_redindices94,2802 mark_backtest.py,177 import pandas as pdpd1,0 def calc_mark_diff(asset_class="Subprime"):calc_mark_diff5,46 def closest(x):closest35,1353 def remove_max_min(x):remove_max_min56,2172 load_refentity.py,395 import lxml.etree as etreeetree5,79 def todict(xml, uselist=set()):todict11,191 def dispatch_parsing(col, uselist):dispatch_parsing30,777 def insert_refentity(fname):insert_refentity43,1110 def parse_prospectus(xml):parse_prospectus98,2593 def insert_refobligation(fname):insert_refobligation102,2681 def simple_parse(e):simple_parse155,4180 def get_date(f):get_date187,5316 notebooks/.ipynb_checkpoints/path-checkpoint.py,0 notebooks/path.py,0 load_globeop_report.py,631 import pandas as pdpd3,33 def get_globs(fname, years=["2013", "2014", "2015", "2016", "2017"]):get_globs9,139 def read_valuation_report(f):read_valuation_report26,603 def valuation_reports():valuation_reports50,1531 def read_pnl_report(f):read_pnl_report61,1952 def pnl_reports():pnl_reports71,2376 def read_cds_report(f):read_cds_report83,2815 def drop_zero_count(df):drop_zero_count87,2915 def read_swaption_report(f):read_swaption_report143,4793 def drop_zero_count(df):drop_zero_count147,4898 def cds_reports():cds_reports180,5798 def monthly_pnl_bycusip(df, strats):monthly_pnl_bycusip193,6209 bbg_index_quotes.py,0 handle_default.py,400 def get_recovery(company_id: int, seniority: str, conn):get_recovery5,59 def affected_indices(company_id: int, seniority: str, conn):affected_indices15,351 def create_newindices(recordslist, recovery, lastdate, conn):create_newindices30,894 def update_indexmembers(newids, company_id, seniority, conn):update_indexmembers53,1812 def update_redcodes(index_type, conn):update_redcodes66,2294 markit_tranche_quotes_csv.py,43 def convert_float(s):convert_float19,597 analytics/index.py,1027 import pandas as pdpd4,46 def g(index, spread, exercise_date, pv=None):g17,363 class CreditIndex(CreditDefaultSwap):CreditIndex58,1659 def __init__(__init__69,1864 def from_tradeid(cls, trade_id):from_tradeid143,4561 def hy_equiv(self):hy_equiv167,5369 def ref(self):ref178,5699 def ref(self, val):ref185,5843 def mark(self, **args):mark191,5974 def value_date(self, d):value_date210,6737 def factor(self):factor223,7157 def version(self):version227,7222 def cumloss(self):cumloss231,7289 class ForwardIndex:ForwardIndex235,7343 def __init__(self, index, forward_date, observer=True):__init__247,7576 def from_name(from_name260,8071 def forward_annuity(self):forward_annuity273,8380 def forward_pv(self):forward_pv277,8463 def forward_spread(self):forward_spread281,8536 def ref(self):ref285,8623 def ref(self, val):ref289,8689 def __hash__(self):__hash__292,8743 def _update(self, *args):_update295,8850 analytics/portfolio.py,1379 import pandas as pdpd4,109 import numpy as npnp5,129 def portf_repr(method):portf_repr11,203 def f(*args):f12,227 def percent(x):percent16,305 class Portfolio:Portfolio47,1160 def __init__(self, trades, trade_ids=None):__init__48,1177 def __bool__(self):__bool__59,1604 def add_trade(self, trades, trade_ids):add_trade62,1662 def __iter__(self):__iter__66,1783 def __getitem__(self, trade_id):__getitem__70,1858 def indices(self):indices79,2113 def swaptions(self):swaptions83,2221 def tranches(self):tranches87,2333 def items(self):items90,2432 def pnl(self):pnl95,2569 def pnl_list(self):pnl_list99,2650 def pv(self):pv103,2733 def pv_list(self):pv_list107,2812 def reset_pv(self):reset_pv110,2879 def value_date(self):value_date115,2973 def value_date(self, d):value_date119,3055 def mark(self, **kwargs):mark124,3173 def shock(self, params=["pnl"], **kwargs):shock131,3341 def ref(self):ref137,3518 def ref(self, val):ref144,3699 def spread(self):spread158,4201 def spread(self, val):spread165,4394 def delta(self):delta181,4941 def gamma(self):gamma190,5203 def dv01(self):dv01194,5318 def theta(self):theta198,5401 def hy_equiv(self):hy_equiv202,5486 def _todf(self):_todf205,5563 analytics/scenarios.py,863 import pandas as pdpd2,12 import numpy as npnp4,58 def run_swaption_scenarios(run_swaption_scenarios14,361 def run_index_scenarios(index, date_range, spread_shock, params=["pnl"]):run_index_scenarios59,1747 def _aux(portf, curr_vols, params, vs):_aux73,2222 def MaybePool(nproc):MaybePool80,2442 def run_portfolio_scenarios_module(run_portfolio_scenarios_module84,2511 def join_dfs(l_df):join_dfs123,3643 def run_portfolio_scenarios(portf, date_range, params=["pnl"], **kwargs):run_portfolio_scenarios139,4219 def run_tranche_scenarios(tranche, spread_range, date_range, corr_map=False):run_tranche_scenarios201,6522 def run_tranche_scenarios_rolldown(tranche, spread_range, date_range, corr_map=False):run_tranche_scenarios_rolldown264,8858 def run_curve_scenarios(portf, spread_range, date_range, curve_per):run_curve_scenarios370,13356 analytics/exceptions.py,56 class MissingDataError(Exception):MissingDataError1,0 analytics/option.py,4328 import bottleneck as bnbn1,0 import numpy as npnp5,67 import pandas as pdpd6,86 import matplotlib.pyplot as pltplt23,688 def calib(S0, fp, tilt, w, ctx):calib36,1011 def ATMstrike(index, exercise_date):ATMstrike40,1092 class BlackSwaption(ForwardIndex):BlackSwaption60,1622 def __init__(__init__76,1906 def __setstate__(self, state):__setstate__91,2427 def from_tradeid(cls, trade_id, index=None):from_tradeid97,2597 def mark(self, source_list=[], surface_id=None, **kwargs):mark123,3533 def value_date(self):value_date164,5123 def value_date(self, d):value_date168,5210 def exercise_date(self):exercise_date178,5584 def exercise_date(self, d):exercise_date182,5673 def strike(self):strike193,6047 def strike(self, K):strike200,6213 def atm_strike(self):atm_strike211,6555 def moneyness(self):moneyness219,6795 def direction(self):direction225,6964 def direction(self, d):direction232,7114 def intrinsic_value(self):intrinsic_value241,7370 def __hash__(self):__hash__246,7588 def pv(self):pv252,7744 def price(self):price277,8554 def price(self, p):price281,8666 def tail_prob(self):tail_prob285,8786 def pv(self, val):pv297,9293 def handle(x):handle308,9660 def reset_pv(self):reset_pv321,9955 def pnl(self):pnl325,10030 def delta(self):delta335,10368 def hy_equiv(self):hy_equiv349,10806 def T(self):T355,10960 def gamma(self):gamma362,11137 def theta(self):theta375,11474 def vega(self):vega383,11647 def DV01(self):DV01392,11848 def breakeven(self):breakeven402,12107 def shock(self, params, *, spread_shock, vol_surface, vol_shock, **kwargs):shock425,12875 def __repr__(self):__repr__451,14044 def __str__(self):__str__488,15623 class Swaption(BlackSwaption):Swaption492,15709 def __init__(__init__495,15780 def __hash__(self):__hash__502,16030 def pv(self):pv507,16116 def pv(self, val):pv550,17609 def handle(x):handle556,17767 def __setpv_black(self, val):__setpv_black573,18161 def __setprice_black(self, p):__setprice_black585,18570 def _get_keys(df, models=["black", "precise"]):_get_keys591,18746 class QuoteSurface:QuoteSurface603,19167 def __init__(__init__604,19187 def list(self, source=None):list635,20461 class VolSurface(QuoteSurface):VolSurface648,20847 def __init__(__init__649,20879 def __getitem__(self, surface_id):__getitem__655,21077 def vol(self, T, moneyness, surface_id):vol687,22263 def plot(self, surface_id):plot693,22517 def _compute_vol(option, strike, mid):_compute_vol709,23088 def _calibrate_model(_calibrate_model719,23337 def _calibrate(index, quotes, option_type, **kwargs):_calibrate764,24963 class ModelBasedVolSurface(VolSurface):ModelBasedVolSurface771,25224 def __init__(__init__772,25264 def list(self, source=None, option_type=None):list800,26385 def __getitem__(self, surface_id):__getitem__808,26696 def index_ref(self, surface_id):index_ref828,27526 def plot(self, surface_id):plot833,27682 class BlackSwaptionVolSurface(ModelBasedVolSurface):BlackSwaptionVolSurface848,28197 class SwaptionVolSurface(ModelBasedVolSurface):SwaptionVolSurface852,28261 class SABRVolSurface(ModelBasedVolSurface):SABRVolSurface856,28320 def _forward_annuity(expiry, index):_forward_annuity861,28398 class ProbSurface(QuoteSurface):ProbSurface873,28841 def __init__(__init__874,28874 def __getitem__(self, surface_id):__getitem__881,29145 def spline(df):spline923,30908 def tail_prob(self, T, strike, surface_id):tail_prob938,31487 def quantile_spread(self, T, prob, surface_id):quantile_spread942,31660 def prob_calib(x, T, surface_id):prob_calib946,31810 def quantile_plot(self, surface_id):quantile_plot964,32276 def plot(self, surface_id):plot981,32853 class BivariateLinearFunction:BivariateLinearFunction997,33435 def __init__(self, T, f):__init__1000,33525 def __call__(self, x, y):__call__1005,33644 def calib_sabr(x, option, strikes, pv, beta):calib_sabr1017,34000 def _calibrate_sabr(index, quotes, option_type, beta):_calibrate_sabr1029,34329 analytics/black.py,270 def d1(F, K, sigma, T):d17,115 def d2(F, K, sigma, T):d211,211 def d12(F, K, sigma, T):d1216,322 def cnd_erf(d):cnd_erf26,533 def black(F, K, T, sigma, payer=True):black33,753 def Nx(F, K, sigma, T):Nx42,1044 def bachelier(F, K, T, sigma):bachelier46,1148 analytics/credit_default_swap.py,1674 import numpy as npnp4,41 import pandas as pdpd5,60 class CreditDefaultSwap:CreditDefaultSwap20,492 def __init__(__init__53,1169 def __hash__(self):__hash__95,2520 def _getslots(self):_getslots98,2616 def __getstate__(self):__getstate__105,2863 def __setstate__(self, state):__setstate__108,2955 def start_date(self):start_date114,3121 def end_date(self):end_date118,3194 def start_date(self, d):start_date122,3272 def end_date(self, d):end_date128,3483 def spread(self):spread134,3687 def direction(self):direction141,3837 def direction(self, d):direction148,3986 def _update(self):_update156,4258 def spread(self, s):spread190,5268 def flat_hazard(self):flat_hazard198,5482 def pv(self):pv204,5645 def pv(self, val):pv208,5734 def accrued(self):accrued214,5952 def days_accrued(self):days_accrued218,6076 def clean_pv(self):clean_pv222,6159 def price(self):price226,6259 def price(self, val):price230,6326 def DV01(self):DV01269,7693 def theta(self):theta277,7888 def IRDV01(self):IRDV01288,8336 def rec_risk(self):rec_risk307,8947 def jump_to_default(self):jump_to_default320,9310 def risky_annuity(self):risky_annuity324,9425 def value_date(self):value_date328,9520 def value_date(self, d):value_date335,9721 def reset_pv(self):reset_pv348,10234 def pnl(self):pnl353,10366 def notify(self):notify364,10751 def observe(self, obj):observe368,10835 def shock(self, params, *, spread_shock, **kwargs):shock371,10896 def __repr__(self):__repr__382,11380 analytics/tranche_functions.py,1760 import numpy as npnp1,0 import pandas as pdpd13,332 def wrapped_ndpointer(*args, **kwargs):wrapped_ndpointer18,398 def from_param(cls, obj):from_param21,477 def GHquad(n):GHquad132,4338 def stochasticrecov(R, Rtilde, Z, w, rho, porig, pmod):stochasticrecov137,4423 def fitprob(Z, w, rho, p0):fitprob153,4771 def shockprob(p, rho, Z, give_log):shockprob161,4962 def shockseverity(S, rho, Z, p):shockseverity165,5087 def BCloss_recov_dist(BCloss_recov_dist169,5209 def BCloss_recov_trunc(BCloss_recov_trunc193,5794 def lossdistrib_joint(p, pp, w, S, Ngrid=101, defaultflag=False):lossdistrib_joint218,6406 def lossdistrib_joint_Z(p, pp, w, S, rho, Ngrid=101, defaultflag=False, nZ=500):lossdistrib_joint_Z266,7598 def joint_default_averagerecov_distrib(p, S, Ngrid=101):joint_default_averagerecov_distrib334,9247 def adjust_attachments(K, losstodate, factor):adjust_attachments367,10129 def trancheloss(L, K1, K2):trancheloss375,10334 def trancherecov(R, K1, K2):trancherecov379,10421 def tranche_cl(L, R, cs, K1, K2, scaled=False):tranche_cl383,10517 def tranche_cl_trunc(EL, ER, cs, K1, K2, scaled=False):tranche_cl_trunc401,11063 def tranche_pl(L, cs, K1, K2, scaled=False):tranche_pl414,11435 def tranche_pl_trunc(EL, cs, K1, K2, scaled=False):tranche_pl_trunc428,11826 def tranche_pv(L, R, cs, K1, K2):tranche_pv440,12118 def credit_schedule(tradedate, tenor, coupon, yc, enddate=None):credit_schedule444,12222 def cds_accrued(tradedate, coupon):cds_accrued472,13172 def dist_transform(q):dist_transform489,13704 def dist_transform2(q):dist_transform2505,14125 def compute_pv(q, strike):compute_pv520,14528 def average_recov(p, R, Ngrid):average_recov527,14724 import numpy as npnp555,15730 analytics/sabr.py,269 import numpy as npnp3,30 def sabr_lognormal(alpha, rho, nu, F, K, T):sabr_lognormal12,201 def sabr_normal(alpha, rho, nu, F, K, T):sabr_normal29,710 def sabr(alpha, beta, rho, nu, F, K, T):sabr63,1656 def calib(x, option, strikes, pv, beta):calib140,4114 analytics/tranche_basket.py,4566 import matplotlib.pyplot as pltplt29,815 import pandas as pdpd30,847 import numpy as npnp31,867 class Skew:Skew37,943 def __init__(self, el: float, skew: CubicSpline):__init__40,977 def __iter__(self):__iter__44,1082 def __call__(self, k):__call__48,1157 def from_desc(from_desc52,1249 def plot(self, moneyness_space=True):plot101,3248 class DualCorrTranche:DualCorrTranche119,3879 def __init__(__init__123,3998 def maturity(self):maturity174,5753 def maturity(self, m):maturity178,5840 def _default_prob(self, epsilon=0.0):_default_prob182,5986 def __hash__(self):__hash__190,6208 def aux(v):aux191,6232 def from_tradeid(cls, trade_id):from_tradeid204,6593 def value_date(self):value_date238,7683 def value_date(self, d: pd.Timestamp):value_date242,7771 def tranche_legs(self, K, rho, epsilon=0.0):tranche_legs260,8437 def index_pv(self, epsilon=0.0, discounted=True):index_pv296,9783 def direction(self):direction313,10440 def direction(self, d):direction320,10589 def pv(self):pv329,10875 def clean_pv(self):clean_pv342,11307 def _pv(self, epsilon=0.0):_pv345,11387 def spread(self):spread363,11913 def upfront(self):upfront368,12013 def price(self):price374,12178 def upfront(self, upf):upfront379,12299 def aux(rho):aux380,12327 def reset_pv(self):reset_pv387,12507 def singlename_spreads(self):singlename_spreads391,12623 def pnl(self):pnl414,13373 def __repr__(self):__repr__426,13787 def shock(self, params=["pnl"], *, spread_shock, corr_shock, **kwargs):shock453,14877 def mark(self, **args):mark474,15748 def jump_to_default(self, skew):jump_to_default528,17715 def tranche_factor(self):tranche_factor565,19204 def duration(self):duration573,19393 def hy_equiv(self):hy_equiv577,19511 def delta(self):delta589,19837 def theta(self, method="ATM", skew=None):theta598,20099 def aux(x, K2, shortened):aux599,20145 def find_upper_bound(k, shortened):find_upper_bound609,20469 def expected_loss(self, discounted=True, shortened=0):expected_loss642,21616 def expected_loss_trunc(self, K, rho=None, shortened=0):expected_loss_trunc657,22163 def gamma(self):gamma679,22802 def _greek_calc(self):_greek_calc694,23303 class TrancheBasket(BasketIndex):TrancheBasket706,23699 def __init__(__init__709,23807 def _get_tranche_quotes(self, value_date):_get_tranche_quotes737,24857 def value_date(self, d: pd.Timestamp):value_date786,26975 def skew(self) -> Skew:skew799,27543 def tranche_factors(self):tranche_factors802,27626 def _get_quotes(self, spread=None):_get_quotes805,27726 def default_prob(self):default_prob831,28604 def tranche_legs(self, K, rho, complement=False, shortened=0, zero_recovery=False):tranche_legs837,28834 def jump_to_default(self, zero_recovery=False):jump_to_default869,30140 def tranche_pvs(tranche_pvs911,31934 def index_pv(self, discounted=True, shortened=0, zero_recovery=False):index_pv938,32802 def expected_loss(self, discounted=True, shortened=0):expected_loss962,33732 def expected_loss_trunc(self, K, rho=None, shortened=0):expected_loss_trunc976,34205 def probability_trunc(self, K, rho=None, shortened=0):probability_trunc990,34774 def tranche_durations(self, complement=False, zero_recovery=False):tranche_durations1007,35331 def tranche_EL(self, complement=False, zero_recovery=False):tranche_EL1016,35693 def tranche_spreads(self, complement=False, zero_recovery=False):tranche_spreads1024,35999 def _row_names(self):_row_names1030,36337 def tranche_thetas(tranche_thetas1035,36529 def tranche_fwd_deltas(self, complement=False, shortened=4, method="ATM"):tranche_fwd_deltas1050,37149 def tranche_deltas(self, complement=False, zero_recovery=False):tranche_deltas1065,37724 def tranche_corr01(self, eps=0.01, complement=False, zero_recovery=False):tranche_corr011085,38670 def build_skew(self, skew_type="bottomup"):build_skew1100,39160 def aux(rho, obj, K, quote, spread, complement):aux1104,39303 def map_skew(self, index2, method="ATM", shortened=0):map_skew1151,40880 def aux(x, index1, el1, index2, el2, K2, shortened):aux1152,40939 def aux2(x, index1, index2, K2, shortened):aux21165,41424 def find_upper_bound(*args):find_upper_bound1174,41788 analytics/basket_index.py,1503 import numpy as npnp12,390 import pandas as pdpd13,409 def make_index(t, d, args):make_index21,569 class BasketIndex(CreditIndex):BasketIndex28,721 def __init__(__init__36,894 def __reduce__(self):__reduce__109,3672 def __hash__(self):__hash__114,3831 def aux(v):aux115,3855 def _update_factor(self, d):_update_factor128,4243 def factor(self):factor137,4531 def cumloss(self):cumloss141,4596 def version(self):version145,4663 def _get_quotes(self, *args):_get_quotes148,4716 def value_date(self, d: pd.Timestamp):value_date161,5197 def recovery_rates(self):recovery_rates173,5646 def pv(self, maturity=None, epsilon=0.0, coupon=None):pv178,5850 def pv_vec(self):pv_vec204,6690 def coupon_leg(self, maturity=None):coupon_leg209,6829 def spread(self, maturity=None):spread212,6934 def protection_leg(self, maturity=None):protection_leg215,7049 def duration(self, maturity=None):duration230,7599 def theta(self, maturity=None, coupon=None, theta_date=None):theta245,8125 def coupon(self, maturity=None, assume_flat=True):coupon286,9544 def tweak(self, *args):tweak298,10004 def _snacpv(self, spread, coupon, recov, maturity):_snacpv338,11384 def _snacspread(self, coupon, recov, maturity):_snacspread352,11737 class MarkitBasketIndex(BasketIndex):MarkitBasketIndex367,12103 def __init__(__init__368,12141 def _get_quotes(self):_get_quotes386,12765 analytics/index_data.py,812 import numpy as npnp3,74 import pandas as pdpd12,295 def insert_quotes():insert_quotes15,317 def get_index_quotes(get_index_quotes57,1985 def make_str(key, val):make_str75,2430 def make_params(args):make_params92,2983 def index_returns(index_returns118,3751 def get_singlenames_quotes(indexname, date, tenors):get_singlenames_quotes172,5743 def build_curve(r, tenors):build_curve179,5940 def build_curves(quotes, args):build_curves208,6840 def build_curves_dist(quotes, args, workers=4):build_curves_dist212,6942 def _get_singlenames_curves(index_type, series, trade_date, tenors):_get_singlenames_curves221,7249 def get_singlenames_curves(get_singlenames_curves229,7513 def get_tranche_quotes(index_type, series, tenor, date=datetime.date.today()):get_tranche_quotes240,7882 analytics/curve_trades.py,1616 import pandas as pdpd15,516 import statsmodels.formula.api as smfsmf17,548 import numpy as npnp18,586 import matplotlib.pyplot as pltplt19,605 def curve_spread_diff(curve_spread_diff22,639 def spreads_diff_table(spreads_diff):spreads_diff_table43,1359 def current(s):current44,1397 def zscore(s):zscore47,1443 def theta_matrix_by_series(index="IG", rolling=6):theta_matrix_by_series55,1665 def ratio_within_series(index="IG", rolling=6, param="duration"):ratio_within_series69,2210 def on_the_run_theta(index="IG", rolling=6):on_the_run_theta83,2746 def curve_returns(index="IG", rolling=6, years=3):curve_returns93,3107 def curve_returns_stats(strategies_return):curve_returns_stats120,3991 def sharpe(df, period="daily"):sharpe129,4207 def cross_series_curve(index="IG", rolling=6):cross_series_curve144,4766 def forward_loss(index="IG"):forward_loss165,5568 def curve_model(tenor_1="5yr", tenor_2="10yr"):curve_model190,6492 def curve_model_results(df, model):curve_model_results212,7129 def spread_fin_crisis(index="IG"):spread_fin_crisis240,8052 def forward_spread(forward_spread266,8943 def spot_forward(index="IG", series=None, tenors=["3yr", "5yr", "7yr", "10yr"]):spot_forward283,9481 def curve_pos(value_date, index_type="IG"):curve_pos312,10445 def curve_shape(value_date, index="IG", percentile=0.95, spread=None):curve_shape345,11342 def plot_curve_shape(date):plot_curve_shape379,12635 def pos_pnl_abs(portf, value_date, index="IG", rolling=6, years=3):pos_pnl_abs401,13293 def curve_scen_table(portf, shock=10):curve_scen_table441,14647 analytics/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 analytics/ir_swaption.py,407 class IRSwaption:IRSwaption12,410 def __init__(__init__15,476 def direction(self):direction39,1214 def direction(self, d):direction46,1364 def pv(self):pv55,1620 def sigma(self):sigma59,1705 def sigma(self, s):sigma63,1778 def from_tradeid(trade_id):from_tradeid66,1833 def value_date(self):value_date85,2521 def value_date(self, d):value_date89,2636 analytics/cms_spread.py,1335 import matplotlib.pyplot as pltplt3,30 import numpy as npnp4,62 import pandas as pdpd5,81 def h_call(z, K, S1, S2, mu_x, mu_y, sigma_x, sigma_y, rho):h_call65,1736 def h_put(z, K, S1, S2, mu_x, mu_y, sigma_x, sigma_y, rho):h_put95,2444 def _h1(n, args):_h1111,2935 def get_fixings(conn, tenor1, tenor2, fixing_date=None):get_fixings139,3547 def build_spread_index(tenor1, tenor2):build_spread_index166,4454 def get_swaption_vol_data(get_swaption_vol_data174,4755 def get_swaption_vol_surface(date, vol_type):get_swaption_vol_surface196,5473 def get_swaption_vol_matrix(date, data, vol_type=VolatilityType.ShiftedLognormal):get_swaption_vol_matrix202,5739 def quantlib_model(quantlib_model224,6376 def plot_surf(surf, tenors):plot_surf269,7924 def globeop_model(globeop_model276,8104 def get_cms_coupons(trade_date, notional, option_tenor, spread_index, fixing_days=2):get_cms_coupons297,9151 def get_params(cms_beta, cms_gamma, atm_vol):get_params325,10095 class CmsSpread:CmsSpread346,10924 def __init__(__init__347,10941 def from_tradeid(trade_id):from_tradeid414,13269 def corr(self):corr447,14277 def corr(self, val):corr451,14347 def value_date(self):value_date455,14418 def value_date(self, d: pd.Timestamp):value_date459,14500 def pv(self):pv470,14940 analytics/__init__.py,171 import pandas as pdpd21,491 def on_the_run(index, value_date=datetime.date.today()):on_the_run25,529 def init_ontr(value_date=datetime.date.today()):init_ontr34,791 analytics/utils.py,737 import numpy as npnp2,16 import pandas as pdpd3,35 def GHquad(n):GHquad40,952 def next_twentieth(d):next_twentieth46,1080 def third_wednesday(d):third_wednesday56,1285 def next_third_wed(d):next_third_wed63,1491 def roll_date(d, tenor, nd_array=False):roll_date71,1644 def kwargs(t):kwargs75,1774 def build_table(rows, format_strings, row_format):build_table121,3455 def apply_format(row, format_string):apply_format122,3506 def memoize(f=None, *, hasher=lambda args: (hash(args),)):memoize141,4064 def cached_f(*args, **kwargs):cached_f146,4203 def to_TDate(arr: np.ndarray):to_TDate159,4496 def get_external_nav(engine, trade_id, value_date=None, trade_type="swaption"):get_external_nav164,4620 .credentials/guillaume.horel@serenitascapital.com.json,2342 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0access_token1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0client_id1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0client_secret1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0refresh_token1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0token_expiry1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0token_uri1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0user_agent1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0revoke_uri1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0id_token1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0id_token_jwt1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0access_token1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0expires_in1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0scope1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0token_type1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0token_response1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg001,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0scopes1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0token_info_uri1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0invalid1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0_class1,0 {"access_token": "ya29.Gl2ABp1nxBLEB-rKr6neCpHhDJvbxwXaYJ608mfORpdQmcPmtVhanAV5ezSh15c8AgRb7vNg0_module1,0 .credentials/ghorel@lmcg.com.json,94 "password": "LMCG2019ggh",password2,2 "username": "LEEMUNDER\\ghorel"username3,33 debug_forward_price.py,0 bespoke_utils.py,611 import pandas as pdpd5,160 def insert_bbg_tickers(conn: connection, tickers: List[str]) -> Dict[str, Tuple[str, str]]:insert_bbg_tickers8,182 def insert_bbg_markit_mapping(conn: connection, d: Dict[str, Tuple[str, str]], df: pd.DataFrame)insert_bbg_markit_mapping48,1795 def backpopulate_short_codes(conn: connection):backpopulate_short_codes60,2385 def get_bbg_ids(conn: connection, df: pd.DataFrame,get_bbg_ids80,3332 def get_basketid(conn: connection, name: str) -> Tuple[int, int]:get_basketid94,4090 def add_basket_constituents(conn: connection, basketid: int,add_basket_constituents106,4558 download_markit_quotes.py,74 from selenium.webdriver.support import expected_conditions as ECEC6,247 process_queue.py,976 import task_server.config as configconfig9,110 def get_effective_date(d, swaption_type):get_effective_date291,6943 def get_trades(q, trade_type="bond", fund="SERCGMAST"):get_trades299,7214 def rename_keys(d, mapping):rename_keys319,7916 def build_termination(build_termination326,8098 def build_line(obj, trade_type="bond"):build_line452,12102 def get_bbg_data(get_bbg_data632,19360 def bond_trade_process(conn, session, trade):bond_trade_process743,22752 def send_email(trade):send_email765,23637 def is_tranche_trade(trade):is_tranche_trade774,23867 def cds_trade_process(conn, session, trade):cds_trade_process778,23963 def generate_csv(l, trade_type="bond", fund="SERCGMAST"):generate_csv823,25362 def get_filepath(get_filepath837,25758 def upload_file(file_path: pathlib.Path) -> None:upload_file864,26493 def write_buffer(write_buffer875,26800 def email_subject(trade):email_subject886,27035 def print_trade(trade):print_trade895,27240 bbg_newids.py,77 import pandas as pdpd3,116 import numpy as npnp4,136 def f(s):f28,1065 futures.py,126 def nextIMMDates(startdate, length = 8):nextIMMDates14,270 def QLnextIMMCodes(startdate, length = 8):QLnextIMMCodes33,932 task_runner.py,22 def run():run10,179 tasks.py,356 def build_portfolios(workdate, dealname, reinvflag):build_portfolios8,124 def build_scenarios(workdate, dealname, reinvflag):build_scenarios15,472 class Rpc(object):Rpc22,818 def __init__(self, fun, args):__init__23,837 def __str__(self):__str__27,921 def __call__(self):__call__30,1025 def from_json(cls, s):from_json34,1107 test_dispertion.py,0 test_igoption.py,0 risk/tranches.py,177 def get_tranche_portfolio(date, conn, by_strat=False, fund="SERCGMAST"):get_tranche_portfolio7,104 def insert_tranche_portfolio(portf, conn):insert_tranche_portfolio52,1644 risk/swaptions.py,172 def get_swaption_portfolio(date, conn, **kwargs):get_swaption_portfolio9,139 def insert_swaption_portfolio(portf, conn, overwrite=True):insert_swaption_portfolio30,886 risk/bonds.py,518 import pandas as pdpd1,0 import numpy as npnp2,20 class AssetClass(Enum):AssetClass10,129 def get_df(date, engine, *, zero_factor=False):get_df17,228 def subprime_risk(pos_date, conn, engine, model_date=None):subprime_risk85,2935 def insert_subprime_risk(df, conn):insert_subprime_risk158,5440 def get_portfolio(date, conn, asset_class: AssetClass, fund="SERCGMAST"):get_portfolio206,6510 def crt_risk(date, dawn_conn, engine):crt_risk224,7192 def clo_risk(date, dawn_conn, et_conn):clo_risk247,7886 risk/__main__.py,28 import pandas as pdpd2,16 risk/indices.py,215 import pandas as pdpd2,16 def get_index_portfolio(get_index_portfolio11,266 def VaR(VaR44,1089 def insert_curve_risk(d: datetime.date, conn: connection, strategies=("SER_IGCURVE",)):insert_curve_risk90,2698 risk/__init__.py,0 dtcc_sdr.py,698 import pandas as pdpd3,26 def download_credit_slices(d: datetime.date) -> None:download_credit_slices15,288 def download_cumulative_credit(d: datetime.date) -> None:download_cumulative_credit25,667 def load_data():load_data34,997 def apply_corrections(conn: connection, df):apply_corrections69,2031 def process_option_data(conn: connection, df):process_option_data81,2381 def process_tranche_data(df):process_tranche_data127,4051 def map_tranche(df):map_tranche134,4271 def insert_correction(conn: connection, dissemination_id: int, **kwargs) -> None:insert_correction187,6305 def get_correction(conn: connection, dissemination_id: int) -> Dict[str, Any]:get_correction196,6571 optim_alloc.py,404 import numpy as npnp2,13 from matplotlib import pyplot as pltplt4,44 def cor2cov(Rho, vol):cor2cov7,106 def rho(sigma, delta, volF):rho10,175 def resid_vol(rho, delta, volF):resid_vol14,329 def var(rho, delta, volF):var18,462 def compute_allocation(rho_clo = 0.9, rho_cso=0.6, rho_subprime=0.2,compute_allocation22,596 def plot_allocation(W, fund_return, fund_vol):plot_allocation60,2146 .ipynb_checkpoints/backfill_cds-checkpoint.py,31 def convert(x):convert10,156 position.py,1020 import numpy as npnp3,80 import pandas as pdpd4,99 def get_list(get_list14,275 def get_list_range(engine, begin, end, asset_class=None):get_list_range44,1207 def backpopulate_marks(begin_str="2015-01-15", end_str="2015-07-15"):backpopulate_marks65,1956 def update_securities(engine, session, workdate):update_securities93,3340 def init_fx(session, engine, startdate):init_fx120,4354 def update_fx(conn, session, currencies):update_fx131,4814 def init_swap_rates(init_swap_rates150,5474 def init_swaption_vol(init_swaption_vol173,6206 def split_tenor_expiry(ticker, vol_type="N"):split_tenor_expiry188,6636 def insert_swaption_vol(data, conn, source, vol_type="N"):insert_swaption_vol199,6952 def update_swaption_vol(update_swaption_vol224,7946 def update_swap_rates(update_swap_rates269,9558 def update_cash_rates(conn, session, start_date=None):update_cash_rates286,10181 def populate_cashflow_history(engine, session, workdate=None, fund="SERCGMAST"):populate_cashflow_history312,11097 cds_curve.py,122 import pandas as pdpd5,142 def all_curves_pv(all_curves_pv10,193 def calibrate_portfolio(calibrate_portfolio35,1141 murano.py,187 import pandas as pdpd1,0 def generate_table(df):generate_table64,2976 def list_placeholders(df):list_placeholders99,4294 def nat_to_null(d, _NULL=AsIs('NULL'),nat_to_null118,4962 script_calibrate_tranches.py,26 import numpy as npnp1,0 dates.py,380 import pandas as pdpd2,16 from dateutil.parser import parse as isoparseisoparse9,157 def imm_dates(start_date, end_date):imm_dates19,538 def previous_twentieth(d):previous_twentieth30,886 def imm_date(d):imm_date40,1100 def days_accrued(tradedate):days_accrued49,1306 def isleapyear(date):isleapyear62,1766 def yearfrac(date1, date2, daycount):yearfrac66,1873 thetas-durations.py,209 import numpy as npnp2,16 import pandas as pdpd3,35 def get_legs(index, series, tenors):get_legs23,604 def index_pv(fl, cl, value_date, step_in_date, cash_settle_date, yc, sc, recovery):index_pv52,1678 markit/import_quotes.py,689 import numpy as npnp4,42 import pandas as pdpd5,61 def convert(x):convert15,236 def get_index_list(database, workdate):get_index_list22,335 def get_markit_bbg_mapping(database, basketid_list, workdate):get_markit_bbg_mapping48,1007 def get_bbg_tickers(database, basketid_list, workdate):get_bbg_tickers77,2202 def get_basketids(database, index_list, workdate):get_basketids89,2625 def get_current_tickers(database, workdate):get_current_tickers97,2881 def insert_cds(database, workdate):insert_cds103,3115 def get_date(f):get_date159,5266 def insert_index(engine, workdate=None):insert_index168,5470 def insert_tranche(engine, workdate=None):insert_tranche235,7845 markit/__main__.py,96 import numpy as npnp3,31 import pandas as pdpd4,50 def default_date():default_date33,1091 markit/rates.py,180 import pandas as pdpd6,81 import xml.etree.ElementTree as ETET10,182 def downloadMarkitIRData(download_date=datetime.date.today(), currency="USD"):downloadMarkitIRData16,295 markit/loans.py,265 def download_facility(workdate, payload):download_facility12,170 def insert_facility(conn, workdate):insert_facility24,566 def download_marks(conn, workdate, payload):download_marks50,1489 def update_facility(conn, workdate, payload):update_facility81,2669 markit/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 markit/cds.py,216 import pandas as pdpd9,140 def convertToNone(v):convertToNone14,205 def download_cds_data(payload):download_cds_data18,261 def download_composite_data(payload, historical=False):download_composite_data40,912 markit/README.md,0 markit/__init__.py,0 swaption_quotes.py,101 import pandas as pdpd2,16 def get_refids(get_refids8,138 def adjust_stacks(adjust_stacks32,723 ecb_yieldcurve.py,0 load_cf.py,884 import pandas as pdpd3,27 import numpy as npnp5,101 import rpy2.robjects as roro26,592 def sanitize_float(string):sanitize_float30,636 def processzipfiles(tradedate=datetime.date.today()):processzipfiles41,889 def get_configfile(dealname, tradedate):get_configfile69,2057 def get_dist(date):get_dist85,2483 def get_dealdata(dealname, tradedate):get_dealdata96,2772 def get_cusipdata(cusip, tradedate):get_cusipdata109,3241 def get_dealschedule(dealdata, freq="1Mo", adj=Unadjusted):get_dealschedule115,3446 def dealname_from_cusip(conn, cusips):dealname_from_cusip132,3968 def discounts(tradedate):discounts139,4154 def getdealcf(dealnames, zipfiles, tradedate=datetime.date.today()):getdealcf153,4716 def getcusipcf(params, cfdata, tradedate):getcusipcf205,6912 def compute_delta(dist, dealweight, cusip_pv, tradedate, K1=0, K2=1):compute_delta258,9042 globeop_reports.py,612 import pandas as pdpd8,295 import numpy as npnp9,315 def get_monthly_pnl(group_by=["identifier"]):get_monthly_pnl13,352 def get_portfolio(report_date=None):get_portfolio34,1003 def trade_performance():trade_performance56,1672 def get_net_navs():get_net_navs100,3322 def shift_cash(date, amount, df, strat):shift_cash119,3981 def calc_trade_performance_stats():calc_trade_performance_stats126,4229 def hist_pos(asset_class="rmbs", dm=False):hist_pos147,4981 def rmbs_pos(date, model_date=None, dm=False):rmbs_pos167,5643 def crt_pos(date):crt_pos246,8526 def clo_pos(date):clo_pos252,8626 risk_insight/templates/indices.html,246
graph7,131
select-box9,177 series16,399 what29,760 risk_insight/templates/tranches.html,268
graph17,131
graph28,173 series16,439 greek29,823 risk_insight/templates/index.html,0 risk_insight/views.py,353 def get_attach_from_name(index_type, series):get_attach_from_name11,165 def get_db():get_db29,704 def close_connection(exception):close_connection39,945 def get_risk_numbers():get_risk_numbers46,1091 def get_indices_quotes():get_indices_quotes71,2043 def tranches():tranches109,3208 def indices():indices118,3479 def main():main123,3601 risk_insight/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 risk_insight/static/insight.css,86 .graph{.graph6,74 #select-box{#select-box14,193 .select-box2{.select-box219,255 risk_insight/__init__.py,0 thetas_durations.py,209 import numpy as npnp2,16 import pandas as pdpd3,35 def get_legs(index, series, tenors):get_legs23,604 def index_pv(fl, cl, value_date, step_in_date, cash_settle_date, yc, sc, recovery):index_pv52,1678 parse_preqin.py,0 exchange.py,275 def get_account(email_address):get_account6,118 class ExchangeMessage:ExchangeMessage19,527 def get_msgs(self, count=None, path=["GS", "Swaptions"], **filters):get_msgs22,597 def send_email(self, subject, body, to_recipients, cc_recipients):send_email34,1017 gmail_helpers.py,629 def get_gmail_service():get_gmail_service19,424 def ListMessagesWithLabels(service, user_id, label_ids=[]):ListMessagesWithLabels57,1602 def ListHistory(service, user_id, label_id=None, start_history_id=10000):ListHistory94,2902 def labels_dict(service, user_id):labels_dict137,4292 class GmailMessage(EmailMessage):GmailMessage155,4873 def __init__(self):__init__159,4947 def msgdict(self):msgdict166,5206 def send(self):send169,5305 def list_msg_ids(cls, label, start_history_id=None):list_msg_ids182,5688 def from_id(cls, msg_id, user_id="me"):from_id196,6136 def main():main214,6765 utils/db.py,664 import numpy as npnp10,337 class InfDateAdapter:InfDateAdapter14,372 def __init__(self, wrapped):__init__15,394 def getquoted(self):getquoted18,459 def nan_to_null(f, _NULL=AsIs("NULL"), _Float=psycopg2.extensions.Float):nan_to_null27,749 def dbconn(dbname, cursor_factory=NamedTupleCursor):dbconn38,1027 def dbengine(dbname, cursor_factory=NamedTupleCursor):dbengine53,1426 def with_connection(dbname):with_connection80,2315 def decorator(f):decorator81,2344 def with_connection_(*args, **kwargs):with_connection_84,2397 def query_db(conn, sqlstr, params=None, one=True):query_db99,2754 def close_db():close_db121,3229 utils/__init__.py,312 class SerenitasFileHandler(logging.FileHandler):SerenitasFileHandler6,51 def __init__(self, log_file):__init__13,272 class SerenitasRotatingFileHandler(logging.handlers.RotatingFileHandler):SerenitasRotatingFileHandler18,447 def __init__(self, log_file, maxBytes=0, backupCount=0):__init__21,587 swaption_pnl.py,111 import pandas as pdpd2,16 def get_index_pv(get_index_pv11,284 def get_swaption_pv(get_swaption_pv47,1381 pyisda/Makefile,100 build:build1,0 clean:clean4,45 install:install8,169 docs: builddocs11,194 test:test14,226 pyisda/c_layer/cdsbootstrap.c,61 int cdsBootstrapPointFunctioncdsBootstrapPointFunction3,27 pyisda/c_layer/survival_curve.hpp,1078 struct CurveName {CurveName3,19 enum class __attribute__ ((__packed__)) Seniority {Seniority4,38 Senior,Senior5,94 SubordinatedSubordinated6,110 enum class __attribute__ ((__packed__)) DocClause {DocClause9,139 XR14,XR1410,195 MR14,MR1411,209 MM14,MM1412,223 CR14CR1413,237 void serialize(unsigned char* buf) {serialize15,257 std::string full_ticker() {full_ticker23,523 void serialize(unsigned char* buf, size_t num) {serialize29,698 CurveName(std::string& ticker, Seniority seniority, DocClause doc_clause) :CurveName37,982 CurveName(const unsigned char* buf) {CurveName42,1152 CurveName() {};CurveName50,1416 size_t size() {size52,1437 bool operator<(const CurveName &other) const {operator <56,1541 std::string str_seniority() const {str_seniority63,1836 std::string str_doc_clause() const {str_doc_clause72,2057 std::string ticker;ticker85,2373 Seniority seniority;seniority86,2397 DocClause doc_clause;doc_clause87,2422 pyisda/c_layer/cdsbootstrap.h,512 #define SUCCESS SUCCESS12,171 #define FAILURE FAILURE13,189 {__anoneade35ba010816,224 TDate stepinDate;stepinDate17,226 TDate cashSettleDate;cashSettleDate18,258 TCurve *discountCurve;discountCurve19,294 TCurve *cdsCurve;cdsCurve20,329 double recoveryRate;recoveryRate21,359 double spread;spread22,393 TContingentLeg *cl;cl23,421 TFeeLeg *fl;fl24,445 } cds_bootstrap_ctx;cds_bootstrap_ctx25,469 pyisda/setup.py,0 pyisda/example.py,0 pyisda/pyisda/legs.pyx,864 cdef class ContingentLeg:ContingentLeg7,221 def __cinit__(self, start_date, end_date, double notional,__cinit__20,532 def __dealloc__(self):__dealloc__30,989 def __reduce__(self):__reduce__34,1087 def __hash__(self):__hash__41,1459 def end_date(self):end_date48,1712 def pv(self, today, step_in_date, value_date, YieldCurve yc not None,pv51,1791 cdef class FeeLeg:FeeLeg79,2932 def __cinit__(self, start_date, end_date, bint pay_accrued_on_default,__cinit__99,3520 def __reduce__(self):__reduce__122,4593 def __hash__(self):__hash__131,5114 def inspect(self):inspect140,5501 def cashflows(self):cashflows155,6149 def pv(self, today, step_in_date, value_date, YieldCurve yc not None,pv165,6479 def accrued(self, today):accrued193,7608 def __dealloc__(self):__dealloc__208,7914 pyisda/pyisda/logging.pxd,0 pyisda/pyisda/version.pyx,28 def version():version4,71 pyisda/pyisda/cdsone.pxd,0 pyisda/pyisda/optim.pyx,375 cdef free_my_ctx(object cap):free_my_ctx50,2064 def init_context(YieldCurve yc not None, trade_date, value_date, start_date,init_context58,2310 cdef api double pv(double Z, void* ctx) nogil except NAN:pv110,4631 def update_context(object ctx, double S0):update_context144,6167 def expected_pv(double[:] tilt, double[:] w, double S0, object ctx):expected_pv150,6382 pyisda/pyisda/credit_index.pyx,2474 from cython.operator cimport dereference as deref, preincrement as preincderef7,272 from cython.operator cimport dereference as deref, preincrement as preincpreinc7,272 cimport numpy as npnp22,1113 import pandas as pdpd24,1151 cdef TFeeLeg* copyFeeLeg(TFeeLeg* leg) nogil:copyFeeLeg31,1278 cdef TContingentLeg* copyContingentLeg(TContingentLeg* leg) nogil:copyContingentLeg43,1802 cdef class CurveList:CurveList49,2048 def __init__(self, list curves not None, value_date=None):__init__52,2107 def __getitem__(self, tuple name not None):__getitem__92,3464 def items(self):items114,4453 def weights(self):weights128,4955 def tickers(self):tickers137,5277 def value_date(self):value_date146,5572 def value_date(self, d):value_date150,5669 def curves(self):curves154,5757 def curves(self, list l not None):curves173,6403 def __reduce__(self):__reduce__205,7564 cdef class CreditIndex(CurveList):CreditIndex209,7698 def __init__(self, start_date, maturities, list curves, value_date=None):__init__210,7733 def __dealloc__(self):__dealloc__227,8566 def __reduce__(self):__reduce__264,10230 def __hash__(self):__hash__269,10421 def pv_vec(self, step_in_date, cash_settle_date, YieldCurve yc not None):pv_vec299,11771 def accrued(self):accrued355,14242 def pv(self, step_in_date, cash_settle_date, maturity, YieldCurve yc not None,pv360,14382 def theta(self, step_in_date, cash_settle_date, maturity, YieldCurve yc not None,theta390,15594 def protection_leg(self, step_in_date, cash_settle_date, maturity, YieldCurve yc not None):protection_leg447,18058 def duration(self, step_in_date, cash_settle_date, maturity, YieldCurve yc not None):duration482,19617 def maturities(self):maturities531,21337 def maturities(self, list val):maturities541,21560 def tweak_portfolio(self, double epsilon, maturity, bint inplace=True):tweak_portfolio554,22030 def survival_matrix(self, const TDate[::1] schedule=None, double epsilon=0.):survival_matrix575,22847 cdef unsigned long fill_mask(const TDate maturity, const vector[TDate]& maturities,fill_mask604,23893 cdef inline int get_maturity_index(TDate maturity, const vector[TDate]& maturities):get_maturity_index631,24590 cdef pair[TContingentLeg_ptr, TFeeLeg_ptr] get_legs(TDate maturity,get_legs640,24830 cdef double pv(const vector[shared_ptr[TCurve]]& curves,pv663,25819 pyisda/pyisda/date.pyx,965 from cpython cimport datetime as c_datetimec_datetime2,16 cimport numpy as npnp6,159 cpdef TDate pydate_to_TDate(c_datetime.date d):pydate_to_TDate13,250 cpdef c_datetime.date TDate_to_pydate(TDate d):TDate_to_pydate16,363 cdef long dcc(str day_count) except -1:dcc24,601 def dcc_tostring(long day_count):dcc_tostring34,862 cdef TDate _previous_twentieth(TDate d, bint roll) nogil:_previous_twentieth39,980 def previous_twentieth(d, bint roll=True):previous_twentieth66,1634 def cds_accrued(d, double coupon):cds_accrued72,1804 cdef TMonthDayYear next_twentieth(TDate d) nogil:next_twentieth78,2010 cdef inline TDate next_business_day(TDate date, long method) nogil:next_business_day96,2451 cdef void _roll_date(TDate d, const double* tenors, int n_dates, TDate* output) nogil:_roll_date103,2645 def roll_date(d, tenor):roll_date139,3771 def default_accrual(trade_date, edd, start_date, end_date, double notional,default_accrual166,4595 pyisda/pyisda/curve.pyx,3241 from cython.operator import dereference as deref, preincrement as preincderef1,0 from cython.operator import dereference as deref, preincrement as preincpreinc1,0 cimport numpy as npnp14,726 import numpy as npnp15,746 import pandas as pdpd17,783 cdef inline void double_free(double* ptr) nogil:double_free33,1198 cdef double survival_prob(const TCurve* curve, TDate start_date, TDate maturity_date, double epssurvival_prob37,1263 cdef class Curve(object):Curve57,1996 def __getstate__(self):__getstate__59,2023 def __setstate__(self, bytes state):__setstate__68,2318 cdef size_t size(self) nogil:size75,2564 def from_bytes(cls, object state):from_bytes79,2661 def __hash__(self):__hash__94,3192 def inspect(self):inspect104,3540 def to_series(self, bint forward=True):to_series120,4098 def __iter__(self):__iter__151,5303 def __len__(self):__len__158,5531 def __deepcopy__(self, dict memo):__deepcopy__161,5597 def forward_hazard_rates(self):forward_hazard_rates170,5875 def base_date(self):base_date202,7081 def __forward_zero_price(self, d2, d1=None):__forward_zero_price205,7166 cdef fArray_to_list(TRatePt* fArray, int fNumItems):fArray_to_list224,7764 cdef class YieldCurve(Curve):YieldCurve231,7971 def __init__(self, date, str types,__init__260,8933 cdef size_t size(self) nogil:size317,11087 def __getstate__(self):__getstate__320,11207 def __setstate__(self, bytes state):__setstate__332,11586 def __deepcopy__(self, dict memo):__deepcopy__345,12076 def from_bytes(cls, object state):from_bytes353,12363 def __hash__(self):__hash__376,13163 def from_discount_factors(cls, base_date, list dates, double[:] dfs, str day_count_conv):from_discount_factors393,13727 def dates(self):dates413,14661 def expected_forward_curve(self, forward_date):expected_forward_curve419,14801 cdef void tweak_curve(const TCurve* sc, TCurve* sc_tweaked, double epsilon,tweak_curve443,15873 cdef class SpreadCurve(Curve):SpreadCurve462,16544 def __init__(self, today, YieldCurve yc not None, start_date, step_in_date,__init__484,17217 cdef size_t size(self) nogil:size622,23359 def __getstate__(self):__getstate__627,23568 def __setstate__(self, bytes state):__setstate__644,24196 def __deepcopy__(self, dict memo):__deepcopy__662,24926 def defaulted(self):defaulted675,25549 def default_date(self):default_date679,25625 def from_bytes(cls, bytes state):from_bytes684,25755 def __hash__(self):__hash__710,26809 def from_flat_hazard(cls, base_date, double rate, Basis basis=CONTINUOUS,from_flat_hazard728,27502 def tweak_curve(self, double epsilon, bint multiplicative=True,tweak_curve764,29003 def par_spread(self, today, step_in_date, start_date, end_dates,par_spread801,30360 def recovery_rates(self):recovery_rates854,32556 def ticker(self):ticker862,32861 def full_ticker(self):full_ticker866,32936 def seniority(self):seniority870,33023 def doc_clause(self):doc_clause874,33120 cdef TCurve* _fill_curve(const TCurve* sc, const TDate* end_dates, int n_dates) nogil:_fill_curve880,33257 pyisda/pyisda/credit_index.pxd,92 cdef class CurveList:CurveList8,224 cdef class CreditIndex(CurveList):CreditIndex16,471 pyisda/pyisda/legs.pxd,607 cdef TContingentLeg* JpmcdsCdsContingentLegMake(JpmcdsCdsContingentLegMake39,866 cdef TFeeLeg* JpmcdsCdsFeeLegMake(JpmcdsCdsFeeLegMake50,1276 cdef int JpmcdsContingentLegPV(TContingentLeg *cl, # Contingent legJpmcdsContingentLegPV80,2612 cdef int JpmcdsFeeLegPV(TFeeLeg *fl,JpmcdsFeeLegPV90,3247 cdef TCashFlowList* JpmcdsFeeLegFlows(TFeeLeg *fl)JpmcdsFeeLegFlows99,3605 cdef void JpmcdsFeeLegFree(TFeeLeg *p)JpmcdsFeeLegFree101,3660 cdef void FeeLegAI(TFeeLeg* fl,FeeLegAI103,3703 cdef class ContingentLeg:ContingentLeg107,3808 cdef class FeeLeg:FeeLeg111,3870 pyisda/pyisda/date.pxd,440 from cpython cimport datetime as c_datetimec_datetime1,0 cdef long dcc(str day_count) except -1dcc7,206 cpdef TDate pydate_to_TDate(c_datetime.date d)pydate_to_TDate89,3090 cpdef c_datetime.date TDate_to_pydate(TDate d)TDate_to_pydate91,3138 cdef void _roll_date(TDate d, const double* tenors, int n_dates, TDate* output) nogil_roll_date93,3186 cdef TDate _previous_twentieth(TDate d, bint roll) nogil_previous_twentieth94,3272 pyisda/pyisda/logging.pyx,244 def enable_logging():enable_logging3,53 def disable_logging():disable_logging11,239 def set_logging_file(str file_name, TBoolean append = True):set_logging_file15,312 def log_message(str msg):log_message21,502 def flush():flush25,585 pyisda/pyisda/curve.pxd,924 cdef inline size_t TCurve_size(const TCurve* curve) nogil:TCurve_size46,1483 cdef inline unsigned char* serialize(const TCurve* curve, unsigned char* buf) nogil:serialize50,1660 cdef inline void serialize_vector(const vector[TDate]& v, unsigned char* cursor) nogil:serialize_vector62,2187 cdef inline const unsigned char* deserialize(const unsigned char* buf, TCurve* curve) nogil:deserialize69,2435 cdef double survival_prob(const TCurve* curve, TDate start_date,survival_prob184,7819 cdef inline const TCurve* get_TCurve(Curve c) nogil:get_TCurve246,9502 cdef class Curve:Curve249,9593 cdef size_t size(self) nogilsize251,9648 cdef class YieldCurve(Curve):YieldCurve253,9682 cdef class SpreadCurve(Curve):SpreadCurve256,9742 cdef fArray_to_list(TRatePt* fArray, int fNumItems)fArray_to_list261,9878 cdef void tweak_curve(const TCurve* sc, TCurve* sc_tweaked, double epsilon,tweak_curve263,9931 pyisda/pyisda/__init__.py,0 pyisda/pyisda/cdsone.pyx,198 def upfront_charge(date, value_date, benchmark_start_date, stepin_date,upfront_charge7,119 def spread_from_upfront(date, value_date, benchmark_start_date, stepin_date,spread_from_upfront69,2760 pyisda/pyisda/utils.py,317 import numpy as npnp22,516 import xml.etree.ElementTree as ETET27,605 def getMarkitIRData(getMarkitIRData32,709 def rate_helpers(currency="USD", MarkitData=None):rate_helpers62,1932 def YC(currency="USD", helpers=None, MarkitData=None):YC117,3629 def build_yc(trade_date, ql_curve=False):build_yc124,3864 pyisda/tests/test_pickle.py,236 import numpy as npnp2,16 class TestPickle(unittest.TestCase):TestPickle10,202 def assertListAlmostEqual(self, l1, l2):assertListAlmostEqual14,329 def test_yc(self):test_yc20,513 def test_legs(self):test_legs27,780 pyisda/docs/Makefile,1125 SPHINXOPTS =SPHINXOPTS5,92 SPHINXBUILD = sphinx-buildSPHINXBUILD6,108 PAPER =PAPER7,137 BUILDDIR = _buildBUILDDIR8,153 PAPEROPT_a4 = -D latex_paper_size=a4PAPEROPT_a411,199 PAPEROPT_letter = -D latex_paper_size=letterPAPEROPT_letter12,240 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .ALLSPHINXOPTS13,285 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .I18NSPHINXOPTS15,441 help:help18,510 clean:clean48,2155 html:html52,2198 dirhtml:dirhtml58,2351 singlehtml:singlehtml64,2519 pickle:pickle70,2693 json:json76,2847 htmlhelp:htmlhelp82,2997 qthelp:qthelp89,3219 applehelp:applehelp99,3614 devhelp:devhelp108,3942 epub:epub118,4239 epub3:epub3124,4388 latex:latex130,4542 latexpdf:latexpdf138,4837 latexpdfja:latexpdfja145,5082 text:text152,5337 man:man158,5486 texinfo:texinfo164,5637 info:info172,5932 gettext:gettext179,6175 changes:changes185,6345 linkcheck:linkcheck191,6498 doctest:doctest198,6723 coverage:coverage204,6935 xml:xml210,7146 pseudoxml:pseudoxml216,7296 dummy:dummy222,7473 pyisda/docs/conf.py,0 pyisda/docs/index.rst,121 Welcome to PyISDA's documentation!Welcome to PyISDA's documentation!6,217 Indices and tablesIndices and tables16,337 pyisda/docs/api.rst,18 PyISDAPyISDA1,0 graphics.py,474 import numpy as npnp1,0 import matplotlib.pyplot as pltplt2,19 def shiftedColorMap(cmap, start=0, midpoint=0.5, stop=1.0, name='shiftedcmap'):shiftedColorMap10,238 def plot_color_map(series, sort_order = [True,True], color_map=cm.RdYlGn, centered = True):plot_color_map61,1995 def plot_prob_map(df, attr="pnl", path=".", color_map=cm.RdYlGn, index='IG'):plot_prob_map94,3197 def plot_swaption_df(df, spread_shock, vol_shock, attr="pnl"):plot_swaption_df122,4267 insert_index.py,0 bbg_prices.py,57 import numpy as npnp3,101 import pandas as pdpd4,120 tests/test_cds.py,357 import numpy as npnp7,190 class TestUpfront(unittest.TestCase):TestUpfront16,399 def test_upfront(self):test_upfront22,590 def test_cdsone(self):test_cdsone25,680 def test_annuity(self):test_annuity44,1722 class TestSpreadCurve(unittest.TestCase):TestSpreadCurve49,1965 def test_upfront_curves(self):test_upfront_curves51,2008 tests/test_tranche_basket.py,320 import numpy as npnp4,85 class TestPickle(unittest.TestCase):TestPickle8,120 def test_pickle(self):test_pickle11,207 def test_pv(self):test_pv15,343 class TestTopDown(unittest.TestCase):TestTopDown19,426 def test_bottomup(self):test_bottomup25,656 def test_topdown(self):test_topdown30,852 tests/test_upfront_cds.py,263 import pandas as pdpd13,777 import numpy as npnp21,1008 def snac_pv(spread, term_date, fixed_coupon=0.01, recovery=0.4, ts=YC()):snac_pv23,1028 def jpmorgan_curves(trade_date, value_date, start_date, end_date, spread, recovery=0.4):jpmorgan_curves45,2470 tests/test_cms_spread.py,350 import numpy as npnp3,28 class TestCmsSpread(unittest.TestCase):TestCmsSpread24,872 def setUp(self):setUp26,913 def test_black_model(self):test_black_model78,3182 def test_h1_hcall(self):test_h1_hcall91,3903 def test_scipy_integrate(self):test_scipy_integrate101,4301 def test_CmsSpread(self):test_CmsSpread108,4657 tests/test_yieldcurve.py,207 class TestYieldCurve(unittest.TestCase):TestYieldCurve10,233 def assertListAlmostEqual(self, list1, list2, places = 7):assertListAlmostEqual12,275 def test_bloomberg(self):test_bloomberg17,476 tests/test_sabr_quantlib.py,28 import numpy as npnp5,237 tests/test_index.py,626 import numpy as npnp3,32 class TestPickle(unittest.TestCase):TestPickle13,235 def test_pickle(self):test_pickle18,400 def test_pickle_basket(self):test_pickle_basket22,532 def test_from_tradeid(self):test_from_tradeid26,719 class TestStrike(unittest.TestCase):TestStrike31,841 def test_pv(self):test_pv37,1060 def test_strike(self):test_strike42,1277 def test_price_setting(self):test_price_setting51,1722 class TestForwardIndex(unittest.TestCase):TestForwardIndex56,1856 def test_forward_pv(self):test_forward_pv64,2149 def test_forward_pv(self):test_forward_pv70,2449 tests/test_scenarios.py,166 import numpy as npnp2,16 import pandas as pdpd3,35 class TestSenarios(unittest.TestCase):TestSenarios12,344 def test_portfolio(self):test_portfolio20,779 tests/test_swap_index.py,107 class UsdLiborSwap(unittest.TestCase):UsdLiborSwap8,176 def test_creation(self):test_creation9,215 tests/test_swaption.py,539 class TestPutCallParity(unittest.TestCase):TestPutCallParity10,157 def test_parity(self):test_parity17,394 def test_parity_black(self):test_parity_black27,905 def test_calibration(self):test_calibration37,1432 def test_hy(self):test_hy45,1707 class TestBreakeven(unittest.TestCase):TestBreakeven55,2093 def test_hypayer(self):test_hypayer68,2493 def test_hyreceiver(self):test_hyreceiver74,2726 def test_igpayer(self):test_igpayer81,3014 def test_igreceiver(self):test_igreceiver87,3239 tests/test_dates.py,1009 import pandas as pdpd3,32 roll_date as roll_date_c,roll_date_c11,203 cds_accrued as cds_accrued_c,cds_accrued_c12,233 class TestStartDate(unittest.TestCase):TestStartDate20,368 def test_previous_twentieth(self):test_previous_twentieth21,408 def test_previous_twentieth_timestamp(self):test_previous_twentieth_timestamp42,1210 class TestEndDate(unittest.TestCase):TestEndDate57,1755 def test_enddate(self):test_enddate58,1793 def test_enddate_pre2015(self):test_enddate_pre201572,2294 class TestEndDateC(unittest.TestCase):TestEndDateC93,3041 def test_enddate(self):test_enddate94,3080 def test_enddate_pre2015(self):test_enddate_pre2015108,3589 class TestCdsAccrued(unittest.TestCase):TestCdsAccrued129,4348 def test_cdsaccrued(self):test_cdsaccrued130,4389 def test_cdsaccrued_c(self):test_cdsaccrued_c145,4948 class TestDaysAccrued(unittest.TestCase):TestDaysAccrued161,5537 def test_days_accrued(self):test_days_accrued162,5579 tests/.ropeproject/config.py,90 def set_prefs(prefs):set_prefs5,45 def project_opened(project):project_opened120,4706 tests/__init__.py,0 Dawn/templates/cds_blotter.html,0 Dawn/templates/bond_blotter.html,0 Dawn/templates/base.html,0 Dawn/templates/edit_cp.html,0 Dawn/templates/future_blotter.html,0 Dawn/templates/capfloor_blotter.html,0 Dawn/templates/trade_entry.html,179 index_list8,235 Upload upload_globeop31,1113 Dawn/templates/wire_blotter.html,0 Dawn/templates/wire_entry.html,996 Upload upload_globeop63,2036