diff options
Diffstat (limited to 'python/trade_template.py')
| -rw-r--r-- | python/trade_template.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/python/trade_template.py b/python/trade_template.py new file mode 100644 index 00000000..dce5081e --- /dev/null +++ b/python/trade_template.py @@ -0,0 +1,33 @@ +from string import Template + +default = "\underline{\hspace{1cm}}" +checked = "\underline{\hspace{0.35cm}X\hspace{0.35cm}}" +d = {} +d['account_number'] = "602382.3" +d['trader_name'] = 'Guillaume Horel' +for tradetype in ['rf', 'df', 'sell', 'buy']: + d['tradetype_'+tradetype] = default +for currency in ['USD', 'EURO', 'CAD', 'YEN']: + d['currency_'+currency] = default +for settle in ['DTC', 'FED', 'EUROCLEAR', 'LOCAL']: + d['settle_'+settle] = default +d['tradetype_buy'] = checked +d['currency_USD'] = checked +d['settle_DTC'] = checked +d['id_security'] = '45670AAA9' +d['class_security'] = 'C' +d['settle_date'] = '2013-05-18' +d['date'] = '2013-05-18' +d['trade_date'] = '2013-05-18' +d['curr_face'] = "1000000" +d['orig_face'] = "1000000" +d['principal'] = "1000000" +d['interest'] = "10000" +d['commission'] = "0" +d['net_amount'] = "0" +with open("templates/trading_form.tex", "r") as fh: + texfile = Template(fh.read()) + texfile = texfile.substitute(d) + +with open("templates/trading_form_filled.tex", "w") as fh: + fh.write(texfile) |
