Slide 1

Slide 1 text

Marketing Material Tech Sessions II: Machine Learning in Production, 8th February 2018 Bayesian Online Change-Point Detection at Scale Paolo Puggioni Machine Learning Data Scientist Data Insights Unit

Slide 2

Slide 2 text

Data Insights Unit

Slide 3

Slide 3 text

Data Insights Unit “Bringing scientific rigour to all discretionary business decisions in Schroders” The Data Insight Unit’s Purpose Data Science in Schroders 2 • Alternative datasets • Building tools • …..

Slide 4

Slide 4 text

Data Insights Unit Bayesian Online Change Detection – Business Case Automated system to alert fund managers about changes in time series 3

Slide 5

Slide 5 text

The “Science” behind the Alerting System

Slide 6

Slide 6 text

Data Insights Unit Naïve Changepoint Detection Simple algorithm that does not work 5 • rolling window • calculate standard deviation σ in the window • find when the new data are outside 2σ

Slide 7

Slide 7 text

Data Insights Unit Naïve Changepoint Detection Simple algorithm that does not work 6 • rolling window • calculate standard deviation σ in the window • find when the new data are outside 2σ

Slide 8

Slide 8 text

Data Insights Unit Bayesian Online Changepoint Detection Literature Research 7 Sources: Adams and MacKay, Arxiv (2007); github

Slide 9

Slide 9 text

Data Insights Unit Bayesian Online Changepoint Detection Literature Research 8 Sources: Adams and MacKay, Arxiv (2007); github

Slide 10

Slide 10 text

Data Insights Unit Bayesian Online Changepoint Detection Literature Research 9 Sources: Adams and MacKay, Arxiv (2007); github

Slide 11

Slide 11 text

Data Insights Unit Modelling the Run Length (from Adams and MacKay, 2007) 10 All possible paths of “run length” rt • iid distribution within each segment • no restriction on which distribution Source: Adams and MacKay, Arxiv (2007)

Slide 12

Slide 12 text

Data Insights Unit Modelling the Run Length (from Adams and MacKay, 2007) 11 All possible paths of “run length” rt • iid distribution within each segment • no restriction on which distribution Source: Adams and MacKay, Arxiv (2007)

Slide 13

Slide 13 text

Data Insights Unit Probability of run length This is the output of the algorithm 12

Slide 14

Slide 14 text

Data Insights Unit Some math (!) (from Adams and MacKay, 2007) 13 Changepoint Prior New Datum Predictive Probability for each possible previous run length Previous Run Length Probabilities Source: Adams and MacKay, Arxiv (2007)

Slide 15

Slide 15 text

Data Insights Unit Some math (!) (from Adams and MacKay, 2007) 14 Source: imgflip.com

Slide 16

Slide 16 text

Data Insights Unit How it looks like in the code 15

Slide 17

Slide 17 text

Data Insights Unit And now ?! This is the output of the algorithm 16

Slide 18

Slide 18 text

Data Insights Unit And now ?! This is the output of the algorithm 17 Fund Managers do not care about the “probability of regime change”. They want to be told when something has changed!

Slide 19

Slide 19 text

Extending the algorithm

Slide 20

Slide 20 text

Data Insights Unit And now ?! This is the output of the algorithm 19

Slide 21

Slide 21 text

Data Insights Unit Calculating the most likely path … without a brute force algorithm! 20 log prob Cumulative log prob path: • cumulate on each diagonal • reset at time t from the highest probability at time t-1

Slide 22

Slide 22 text

Results

Slide 23

Slide 23 text

Data Insights Unit The Algorithm at work From this… 22

Slide 24

Slide 24 text

Data Insights Unit The Algorithm at work … to this! 23

Slide 25

Slide 25 text

Data Insights Unit The Algorithm at work Some automated reports for our fund managers 24

Slide 26

Slide 26 text

Data Insights Unit The Algorithm at work Play videos (!) 25

Slide 27

Slide 27 text

Data Insights Unit … and now in Production How to deliver it to fund managers 26

Slide 28

Slide 28 text

Data Insights Unit Conclusion What we have learnt 27 • Simple problems are usually not that simple • Do literature review • Look for implementations in github • Academic papers tend not to give actionable answers • Always think on how it will run in production

Slide 29

Slide 29 text

Data Insights Unit Marketing material This presentation contains indicative terms for discussion purposes only and is not intended to provide the sole basis for evaluation of the instruments described. It is not intended as promotional material in any respect. The material is not intended as an offer or solicitation for the purchase or sale of any financial instrument. The material is not intended to provide, and should not be relied on for, accounting, legal or tax advice, or investment recommendations. Information herein is believed to be reliable but Schroder Investment Management Ltd (Schroders) does not warrant its completeness or accuracy. No responsibility can be accepted for error of fact or opinion. This does not exclude or restrict any duty or liability that Schroders has to its customers under the Financial Services and Markets Act 2000 (as amended from time to time) or any other regulatory system. Past Performance is not a guide to future performance and may not be repeated. The value of investments and the income from them may go down as well as up and investors may not get back the amounts originally invested. Exchange rates may cause the value of overseas investments and the income from them to rise or fall. Emerging markets generally carry greater political, legal, counterparty and operational risk. The forecasts stated in the presentation are the result of statistical modelling, based on a number of assumptions. Forecasts are subject to a high level of uncertainty regarding future economic and market factors that may affect actual future performance. The forecasts are provided to you for information purposes as at today's date. Our assumptions may change materially with changes in underlying assumptions that may occur, among other things, as economic and market conditions change. We assume no obligation to provide you with updates or changes to this data as assumptions, economic and market conditions, models or other matters change. For the purposes of the Data Protection Act 1998, the data controller in respect of any personal data you supply is Schroder Investment Management Limited. Personal information you supply may be processed for the purposes of investment administration by any company within the Schroders Group and by third parties who provide services and such processing and which may include the transfer of data outside of the European Economic Area. Schroder Investment Management Limited may also use such information to advise you of other services or products offered by the Schroder Group unless you notify it otherwise in writing. Issued in February 2018 by Schroder Investment Management Limited, 31 Gresham Street, London EC2V 7QA Registered in England and Wales Registration No 1893220 Authorised and regulated by the Financial Conduct Authority Telephone: 020 7658 6000 Fax: 020 7658 6965 For your security, communications may be taped or monitored Disclosure statement Important information 28

Slide 30

Slide 30 text

Data Insights Unit Contact Schroder Investment Management Limited, 31 Gresham Street, London EC2V 7QA. schroders.com