Open Source in Quant Finance - xlwings

Download Open Source in Quant Finance - xlwings

Post on 04-Aug-2015

117 views

Category:

Software

5 download

TRANSCRIPT

<p> 1. xlwings Open Source in Quant Finance Conference (Frankfurt/Eschborn) 5 June 2015 Felix Zumstein, CFA 2. About me Startup (2014, Zurich): Mainly Python for Finance Web based trading solutions (Interactive Brokers) Lots of Excel Open-source: xlwings/ExcelPython Previously: 9yrs in Banking /Asset Mgmt Background in Finance &amp; Economics 2 3. Whats in this talk? 3 4. The open-source Python/Excel Landscape 4 Pywin32 xlwings ExcelPython Read/Write Program/Interact xlwt/xlrd XlsxWriter OpenPyxl 5. Why xlwings? 6 Reasons 5 6. (1) Installation 6 pip/conda install xlwings or equally easy: 7. (2) Cross-Platform 7 + 8. (3) Flexibility 8 Version 2.6 2.7 3.1 3.2 3.3 3.4 32-bit 64-bit 32-bit 64-bit 2003 2010 2011 (Mac) 2013 2016 (Win + Mac*) ArchitectureVersion Architecture *under development 9. (4) Simplicity 9 &gt;&gt;&gt;fromxlwingsimportWorkbook,Range &gt;&gt;&gt;wb=Workbook() &gt;&gt;&gt;Range("A1").value=my_variable Strings Numbers DateTime Lists (nested) NumPy arrays Pandas DataFrames Blaze Data container (planned) 10. (5) Works back and forth 10 &gt;&gt;&gt;wb=Workbook() &gt;&gt;&gt;Range("A1").value=my_variable SubMyFunction() RunPython("importmymodule;mymodule.myfunction()") EndSub 11. (6) ExcelPython for UDFs (Windows only) 11 fromxlpythonimportxlfunc importnumpyasnp @xlfunc defmatrix_mult(x,y): x=np.atleast_2d(np.array(x)) y=np.atleast_2d(np.array(y)) returnx.dot(y) {=matrix_mult(A1:B2,D1:E2)} Access from Excel via Array Formula: Write User Dened Functions in Python: 12. Whats next? 12 13. Whats next? Add-in Full integration of xlwings/ExcelPython Add more features: matplotlib etc. Someday Google Sheets LibreOce/OpenOce 13 14. julia&gt;usingPyCall julia&gt;@pyimportxlwingsasxw julia&gt;xw.Workbook() julia&gt;xw.Range("A1",asarray=true)[:table][:value] Use xlwings from Julia 14 &gt;&gt;&gt;fromxlwingsimportWorkbook,Range &gt;&gt;&gt;wb=Workbook() &gt;&gt;&gt;Range("A1",asarray=True).table.value 15. DEMO xlwings.org 15 </p>

Recommended

View more >