Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Próxima SlideShare
Cargando en…5
×

Machine learning in finance using python

1.921 visualizaciones

PyCON APAC 2015 in Taipei
Talk by Eric Tham

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Sé el primero en comentar

Machine learning in finance using python

1. 1. MACHINE LEARNING IN FINANCE USING PYTHON ERIC THAM Director, Quant Strategies Presentation Slides on http://www.slideshare.net/erictham/machine-learning-in-finance-using-python
2. 2. MACHINE LEARNING Key words: Pattern recognition, algorithm, data, prediction… Main categories: Supervised & unsupervised learning Key algorithms : Clustering, regression, classification, regression (more to Statistics) Key Models: SVM, GLS, Tree-based regression, neural network, cluster analysis
3. 3. MACHINE LEARNING IN FINANCE Questions : How do u recognise finance patterns … ? What data? What do u use it for ? Unlike normal usage for facial recognition, NLP
4. 4. MACHINE LEARNING IN FINANCE i. Sentiment analysis : (Behavoiural finance) ii. Credit analytics iii. Financial forecasting iv. Portfolio allocation
5. 5. MACHINE LEARNING PYTHON LIBRARIES Libraries: i. sci-kit learn ii. Theano iii. Stats-model Sentiment analysis generally use machine learning.
6. 6. GENERAL FORECASTING: (MACHINE LEARNING) 3 steps to any forecasting: (or machine learning) 1. Preprocess and transform data: - On both output and input: this is key; it is an art and a science; - in finance: these could be economic variables, sentiment data, price data 2. Model : - CART, neural network, logistic regression etc. - time period 3. Assess and backtest - statistical output; - in sample and out of sample Go back to 1 if necessary.
7. 7. BUILDING A FINANCIAL FORECASTING MODEL IN PYTHON 1. Sourcing data - retrieves data from sources eg quandl, pandas.io, Yahoo finance, proprietary databases (go to datasource.py file)
8. 8. BUILDING FINANCIAL FORECASTING MODEL IN PYTHON 1 .. Technical transformation on data (dataTechnical.py) - technical indicators like RSI, MACD, KDJ:
9. 9. BUILDING FINANCIAL FORECASTING IN PYTHON Go to techInterpret.py
10. 10. BUILDING FINANCIAL FORECASTING MODEL IN PYTHON Training - applies different model parameters (possibly 1000s combinations) to assess best results Go to dataTrain.py
11. 11. PORTFOLIO SELECTION & ALLOCATION 1. clusterPortfolio.py (K-means) - aggregates stock features eg. sentiment, technical indicators, momentum indicators, historical returns, betas etc. - X  n * m : model with n stocks each with m features each - these are clustered into K clusters with the best cluster being selected) - criteria to use: means scores, risk levels, portfolio themes, backtest results etc.
12. 12. PORTFOLIO SELECTION & ALLOCATION Go to clusterPortfolio.py
13. 13. CONCLUSION: Thank you ! Remember it is an art not a science; machine learning in finance gives you a framework to understand the system; Still need intuition and trial-and-error (luck) My Email : erictham115@yahoo.com