# The Thalesians

Images from Thalesians events from around the world over the past 6 years

The Thalesians are a think tank of dedicated professionals with an interest in quantitative finance, economics, mathematics, physics and computer science, not necessarily in that order.

Blog / See our new Thalesians blog / Book / Buy our new book, Trading Thalesians - What the ancient world can teach us about trading today (Palgrave Macmillan) by the Thalesians co-founder, Saeed Amen & foreword by founder, Paul Bilokon

Founding / The group was founded in Sep 2008, by Paul Bilokon (then a quantitative analyst at Lehman Brothers specialising in foreign exchange, and a part-time researcher at Imperial College), and two of his friends and colleagues: Matthew Dixon (then a quantitative analyst at Deutsche Bank) and Saeed Amen (then a quantitative strategist at Lehman Brothers).

The opening of Level39 in 2013 by Mayor Boris Johnson

The Thalesians are also now a member of Level39 - Europe's largest technology accelerator for finance, retail, cyber-security and future cities technology companies​

## Events / Research / Consulting

Events / The Thalesians were originally based in London, UK. In Jan 2011, the organisation became truly global when Matthew Dixon brought it to the United States where he runs the Thalesians NYC seminars with New York Leader Harvey Stein. Attila Agod is the Budapest Leader for our Thalesians Budapest seminars. We are currently in the process of expanding our seminars to Prague and running more workshops.

Research / In late 2013, we started published ground breaking quant strategy notes. Our effort is lead by Saeed Amen, using nearly a decade of his experience both creating and later trading systematic trading models in FX at major investment banks. Visit Research for more.

Consulting / In 2014, we started offering bespoke quant consulting services in markets, signing up our first client, a major US hedge fund and RavenPack, a major news data vendor. Our services includes the creation of bespoke systematic trading models and other quant analysis of financial markets, such as currency hedging and FX transaction cost analysis (TCA). Visit Consulting for more.

## Our Philosophy

We are named after Thales of Miletus (Θαλῆς ὁ Μιλήσιος), a pre-Socratic Greek philosopher who lived in ca. 624 BC-ca. 546 BC. Thales was a mathematician and is familiar to many secondary school students for one of his theorems in geometry.

But more relevantly to us, he was one of the first users of options:

"Thales, so the story goes, because of his poverty was taunted with the uselessness of philosophy; but from his knowledge of astronomy he had observed while it was still winter that there was going to be a large crop of olives, so he raised a small sum of money and paid round deposits for the whole of the olive-presses in Miletus and Chios, which he hired at a low rent as nobody was running him up; and when the season arrived, there was a sudden demand for a number of presses at the same time, and by letting them out on what terms he liked he realised a large sum of money, so proving that it is easy for philosophers to be rich if they choose, but this is not what they care about."Aristotle, Politics, 1259a.

The morale of this anecdote is that it is easy for philosophers to be rich if they choose; the famous Milesian went ahead and proved it.

We, the Thalesians, admire him for that. But we also share many of his values, for example his core belief that a happy man is defined as one "ὁ τὸ μὲν σῶμα ὑγιής, τὴν δὲ ψυχὴν εὔπορος, τὴν δὲ φύσιν εὐπαίδευτος" (who is healthy in body, resourceful in soul and of a readily teachable nature).

This wiki was created to serve as a source of information on quantitative finance, to collate references to various related resources, and to serve as a convergence point for the Thalesians, our colleagues and collaborators. It grew out of Paul Bilokon's finance wiki, which he started in February, 2007.

We believe that secrecy and fidelity are important in the world of finance. But we also acknowledge the power of information sharing in open societies. Let your business logic remain a closely guarded secret. But release everything else into the public domain. What goes around, comes around; this will ultimately spare you reinventing the wheel.

More of our speakers at Thalesians events over the past 6 years

# Forthcoming Events

### Thalesians/Quant Finance Group Germany (Frankfurt) — Quant Evening

Saeed Amen

#### Date and Time

6:00 p.m. on Monday, 7 September, 2015

#### Venue

PPI AG Office, Wilhelm-Leuschner-Straße 79, Frankfurt Am Main

#### Meetup.com

You can register for this FREE event on Meetup.com: http://www.meetup.com/thalesians/events/223304563/

#### Abstract

FREE evening of talks, kindly hosted by PPI AG

Thanks for Jochen Papenbrock and Adrian Zymolka for organising and for PPI AG for hosting.

• History, Mission Statement and Future of the Group & Welcome from PPI Host
• Saeed Amen (Thalesians) - Quant trading in FX & PyThalesians
• Jochen Papenbrock (PPI & Firamis) - Correlation Networks
• Miguel Vaz (D-Fine) - Networks with Python/Spark
• Adrian Zymolka (Axioma) - Multi-Period Optimization

Event finish and drinks!

You can access the Thalesians/Quant Finance Germany (Frankfurt) LinkedIn Group page here.

Selected talk abstracts

Saeed Amen (Thalesians) - Quant trading in FX & PyThalesians - We shall present how to use the open source PyThalesians Python library to analyse FX markets, plot data and also to create FX trading strategies.

Jochen Papenbrock (PPI & Firamis) - Correlation Networks - On the rise: correlation networks experience a vibrant time. They are currently emerging due to their ability of capturing systemic risk and extrinsic fragility. They help to create antifragile portfolios which actually gain from crisis and also do well in calm market times. This is because of their higher order diversification properties which systematically harvest the risk premiums of multiple assets. Also, risk managers, regulators and auditors appreciate correlation networks due to their simplicity and effectiveness - and their ability to scan portfolios for risk and to visualize portfolio fragility. In the talk I will give an overview on all these aspects of correlation networks.

Adrian Zymolka (Axioma) - Multi-Period Optimization - Modern optimizers can handle complex portfolio construction problems with many realistic requirements. In practice - particularly in production environments - such tasks usually focus on immediate decisions to take ('the next portfolio/trade list') which makes them myopic by nature. In contrast, multi-period optimization tackles an entire portfolio evolution through time and determines the optimal allocations/trades for the current as well as subsequent rebalancings at once. This allows to exploit better trade-offs between short- and long-term effects as well as between averaging and accumulating measures, leading to better informed decisions in view of expected future developments.

In this talk, I briefly introduce our approach to multi-period optimization, differentiate it against other time-referenced portfolio construction concepts, and present some typical application cases, like trade scheduling, tracking around benchmark reconstitutions, alpha factor selections, or multi-horizon alpha integration.

(A longer presentation on the topic and the application cases is planned for a future Thalesians seminar.)

TBC

### Thalesians Seminar (Zurich) — Creating trend following fund: How to build a CTA? / interactive Python PyThalesians demo

Saeed Amen

#### Date and Time

6:00 p.m. on Tuesday, 8 September, 2015

#### Venue

Room G 43, Building HG, ETH Hauptgebäude, Rämistrasse 101, 8092 Zurich

#### Meetup.com

You can register for this FREE event on Meetup.com: http://www.meetup.com/thalesians/events/223572550/

#### Abstract

This will be a FREE event and our first event in Zurich - thanks to ETH for kindly hosting this event and for Swati Mital for organising. The talk will be at 6pm Zurich time.

In this talk, we shall be discussing CTAs and giving some background about the industry. We shall give a brief overview of the types of strategies CTAs use to trade markets, creating a generic proxy for a typical CTA fund. We shall also be discussing how CTA strategies can be used to improve the risk adjusted returns of long only equity and bond investors.

Later, there will also be an interactive Python demo showing how to use the PyThalesians Python code library (partially open sourced on GitHub). Amongst other things we shall investigate the properties of intraday FX volatility, where we'll be accessing live market data via Bloomberg and also creating customised plots using Matplotlib.

#### Selected Bios

Saeed Amen is a Managing Director and a Co-founder at Thalesians Ltd.

Saeed started his career at Lehman Brothers. He worked on the FX desk developing systematic trading models for both G10 and EM and was part of the team who developed the MarQCuS suite of models. He was also responsible for a systematic FX prop trading book and conducted research around high frequency FX including economic events. Later he was at Nomura as an Executive Director in Quantitative Strategy, also in FX, developing their model infrastructure and also running systematic FX prop risk. He graduated from Imperial College with a first class honours master's degree in Mathematics and Computer Science.

### Thalesians Seminar (San Francisco) — Steven Pav - Portfolio Inference and Portfolio Overfit

Steven Pav

#### Date and Time & Schedule

6:00 p.m. on Thursday, 10 September, 2015
6pm: Reception in Julia's Lounge
7pm: Talk in the Member's Lounge
8pm: Networking*

#### Venue

Berkeley City Club, 2315 Durant Ave, Berkeley, CA

#### Meetup.com

You can register for this event on Meetup.com: http://www.meetup.com/thalesians/events/224519949/

#### Abstract

By using a little known matrix equation, we derive the asymptotic distribution of the Markowitz portfolio, taking into account common practical tweaks. This allows inference to be performed in a wide variety of asset allocation problems. We also discuss a fundamental bound on portfolio quality when the goal is to maximize the Sharpe ratio. This bound, which can be seen as a quantification of 'overfit', helps solve some puzzles in asset allocation: why diversification can hurt, why portfolio managers do not (or should not) make more than 5 decisions at a time, etc.

#### Bio

Steven Pav served as a quantitative strategist at Cerebellum Capital for 7 years where he designed and implemented backtest, execution, and research infrastructure in Matlab and C for a daily trading system on equities and volatility futures. His contributions also include designing machine learning quantitative strategies and devising methods to correct for overfit bias in the backtesting and strategy development process. Steve holds a Ph.D. in Math from Carnegie Mellon.

#### Acknowledgements

The Thalesians are delighted to acknowledge the sponsorship of this event by Voleon Capital Management.

• Please note the bar in Julia's Lounge will remain open to the public until 8:30pm, but the Member's Lounge will remain open to the Thalesians until 9:30pm.

### IAQF-Thalesians Seminar (New York) — Dr. Agostino Capponi — Arbitrage-Free Pricing of XVA

Agostino Capponi

#### Agenda

Monday, September 21, 2015:

#### Venue

NYU Kimmel Center, Room 914, Kimmel Center, 60 Washington Square South, NY 10012, NY

#### Abstract

The recent financial crisis has highlighted the importance to account for counterparty risk and funding costs in the valuation of over-the-counter portfolios of derivatives. When managing their portfolios, traders face costs for maintaining the hedge of the position, posting collateral resources, and servicing their collateral requests. Due to the interdependencies between these operations, such costs cannot be separated and attributed to different business units (CVA, DVA and FVA desks).

In this talk, we introduce a unified framework for computing the total costs, referred to as XVA, of an European style derivative transaction traded between two risky counterparties. We use no-arbitrage arguments to derive the nonlinear backward stochastic differential equations (BSDEs) associated with the portfolios which replicate long and short positions in the claim.

This leads to defining buyer's and seller’s XVAs which in turn identify a no-arbitrage band. When borrowing and lending rates coincide, our framework recovers a generalized version of Piterbarg's model. In this case, we provide a fully explicit expression for the uniquely determined price of XVA. When they differ, we derive the semi-linear partial differential equations (PDEs) associated with the non-linear BSDEs and show that they admit a unique classical solution. We use these solutions to conduct a numerical analysis showing high sensitivity of the no-arbitrage band and replicating strategies to funding spreads and collateral levels.

#### Speaker

Agostino Capponi is an assistant professor in the IEOR Department at Columbia University, where he is also a member of the Institute for Data Science and Engineering. Agostino received his Master and Ph.D. Degree in Computer Science and Applied and Computational Mathematics from the California Institute of Technology, respectively in 2006 and 2009.

His main research interests are in the area of networks, with a special focus on systemic risk, contagion, and control. In the context of financial networks, the outcome of his research contributes to a better understanding of risk management practices, and to assess the impact of regulatory policies aimed at controlling financial markets. He has been awarded a grant from the Institute for New Economic Thinking for his research on dynamic contagion mechanisms. His work on systemic risk dynamics under central clearing done in collaboration with the Department of Treasury has obtained press coverage from major organizations such as Bloomberg and Reuters. His research has been published in top-tier journals of Financial Mathematics, Operations Research, and Engineering. His work has also been published in leading practitioner journals and invited book chapters. Agostino holds a world patent for a target tracking methodology in military networks.

#### IAQF-Thalesians Seminars

The IAQF-Thalesians Seminar Series is a joint effort on the part of the IAQF (formerly IAFE) and the Thalesians. The goal of the series is to provide a forum for the exchange of new ideas and results related to the field of quantitative finance. This goal is accomplished by hosting seminars where leading practitioners and academics present new work, and following the seminars with a reception to facilitate further interaction and discussion. The seminar series is limited to IAQF and Thalesians members only.

### Thalesians Seminar (London) — Stephen Pulman — Multi-Dimensional Sentiment Analysis

Stephen Pulman

#### Date and Time

7:30 p.m. on Wednesday, 23 September, 2015

#### Venue

Ginger Room, Marriott Hotel, Canary Wharf, London, UK.

#### Meetup.com

You can register for this event and pay online on Meetup.com: http://www.meetup.com/thalesians/events/223986866/

#### Abstract

All sentiment analysis systems can deliver positive/ negative/neutral classifications. But there are many other useful signals in text: emotion, intent, speculation, risk, etc. This talk will present a survey of the state of the art in recognising these other dimensions of sentiment in text and describe some practical applications in finance and elsewhere.

#### Speaker

Stephen Pulman is Professor of Computational Linguistics at the Department of Computer Science, Oxford University. He is a Professorial Fellow of Somerville College, Oxford, and a Fellow of the British Academy. He has also held visiting professorships at the Institut für Maschinelle Sprachverarbeitung, University of Stuttgart; and at Copenhagen Business School. He is a co-founder of TheySay Ltd. Previous positions include Professor of General Linguistics at Oxford University, Assistant Professor (Reader) at the University of Cambridge Computer Laboratory, and Director of SRI International's Cambridge.

### Thalesians Seminar (New York) — Creating trend following fund: How to build a CTA? / interactive Python PyThalesians demo

Saeed Amen

#### Date and Time

6:00 p.m. on Thursday, 1 October, 2015

#### Meetup.com

You can register for this event and pay for tickets at Meetup.com: http://www.meetup.com/thalesians/events/224534116/

#### Abstract

In this talk, we shall be discussing CTAs and giving some background about the industry. We shall give a brief overview of the types of strategies CTAs use to trade markets, creating a generic proxy for a typical CTA fund. We shall also be discussing how CTA strategies can be used to improve the risk adjusted returns of long only equity and bond investors.

Later, there will also be an interactive Python demo showing how to use the PyThalesians Python code library (partially open sourced on GitHub). Amongst other things we shall investigate the properties of intraday FX volatility, where we'll be accessing live market data via Bloomberg and also creating customised plots using Matplotlib.

#### Selected Bios

Saeed Amen is a Managing Director and a Co-founder at Thalesians Ltd.

Saeed started his career at Lehman Brothers. He worked on the FX desk developing systematic trading models for both G10 and EM and was part of the team who developed the MarQCuS suite of models. He was also responsible for a systematic FX prop trading book and conducted research around high frequency FX including economic events. Later he was at Nomura as an Executive Director in Quantitative Strategy, also in FX, developing their model infrastructure and also running systematic FX prop risk. He graduated from Imperial College with a first class honours master's degree in Mathematics and Computer Science.

### IAQF-Thalesians Seminar (New York) — Dr. Dan Pirjol — Can one price Eurodollar futures in the Black-Derman-Toy model?

Dan Pirjol

#### Agenda

Wednesday, October 14, 2015:

#### Venue

NYU Kimmel Center, Room 914, Kimmel Center, 60 Washington Square South, NY 10012, NY

#### Abstract

Interest rates models with log-normally distributed rates in continuous time are known to display singular behavior. For example, Eurodollar futures prices are infinite in the Dothan and Black-Karasinski models, as shown in 1998 by Hogan and Weintraub. These singularities are usually assumed to disappear when the models are simulated in discrete time. Using a precise simulation of the BDT model, we demonstrate that this is true only for sufficiently low volatilities. Eurodollar futures prices explode for volatilities above a critical value. The explosion is due to contributions from a region in state space which corresponds to very large interest rates and is truncated off in usual simulation methods such as trees and finite difference methods. In the limit of a very small simulation time step the explosion appears for any volatility, and reproduces the Hogan-Weintraub singularity of the continuous time model.

#### Speaker

Dan Pirjol works in the Model Risk Group at JP Morgan, covering valuation models in commodities. Previously he was with Markit and Merrill Lynch in various roles in modeling and model risk, after doing research in theoretical high energy physics. He is interested in applications of methods from mathematical physics and probability to problems in mathematical finance.

#### IAQF-Thalesians Seminars

The IAQF-Thalesians Seminar Series is a joint effort on the part of the IAQF (formerly IAFE) and the Thalesians. The goal of the series is to provide a forum for the exchange of new ideas and results related to the field of quantitative finance. This goal is accomplished by hosting seminars where leading practitioners and academics present new work, and following the seminars with a reception to facilitate further interaction and discussion. The seminar series is limited to IAQF and Thalesians members only.

### Thalesians Seminar (London) — Robert Carver — Lessons from Systematic Trading

Robert Carver

#### Date and Time

7:30 p.m. on Wednesday, 21 October, 2015

#### Venue

Ginger Room, Marriott Hotel, Canary Wharf, London, UK.

#### Meetup.com

You can register for this event and pay online on Meetup.com: http://www.meetup.com/thalesians/events/224130063/

#### Abstract

It's my belief that successful systematic trading is not about finding some deep hidden source of alpha, but about avoiding stupid mistakes. In this talk I share some of the mistakes I've made, and seen others make, whilst designing and managing systematic trading systems for both a multi billion hedge fund and a retail trading account. This is a wide ranging talk which provocatively questions many commonly held beliefs about the business of managing money systematically.

#### Speaker

Robert Carver is an independent systematic trader, and writer. He trades his own capital with a fully automated system of 40 futures markets, using a proprietary system written in python. Robert is the author of "Systematic Trading", a forthcoming book to be published by Harriman House in October 2015. He regularly blogs on the subject of trading, finance and investment.

Robert, who has bachelors and masters degrees in Economics, began his city career trading exotic derivative products for Barclays Capital. He then worked as a portfolio manager for AHL , one of the worlds largest systematic hedge funds before, during and after the global financial meltdown of 2008. Robert was responsible for the creation of AHL's fundamental cross asset global macro strategy, and then managed the funds multi billion dollar fixed income portfolio. He retired from the industry in 2013.

# Recent Events

### IAQF-Thalesians Seminar (New York) — Dr. Tim Leung — Exchange-Traded Funds and Related Trading Strategies

Tim Leung

#### Agenda

Thursday, June 18, 2015:

#### Venue

NYU Kimmel Center, Room 914, Kimmel Center, 60 Washington Square South, NY 10012, NY

#### Abstract

We discuss a number of static and dynamic portfolios related to exchange-traded funds (ETFs). We first discuss the price dynamics of futures-based ETFs and leveraged ETFs. This leads us to develop futures-based strategies for the objective of leverage replication, and discuss their applications to VIX and commodity (L)ETFs. We also analyzed several trading strategies involving multiple leveraged ETFs, accounting for their leverage ratios, volatility decays, expense ratios, and tracking errors. The performance and risk characteristics of these portfolios are studied both analytically and empirically.

#### Speaker

Tim Leung is an Assistant Professor at Columbia University's IEOR Department. He's also an affiliated faculty member of the Center for Financial Engineering, and Institute for Data Sciences & Engineering. He received a Ph.D. in Operations Research & Financial Engineering (ORFE) from Princeton University, and B.S. in Operations Research & Industrial Engineering (ORIE) at Cornell University.

Professor Leung's research focuses on the valuation of financial derivatives, and associated risk management and trading strategies. In particular, he has written extensively on exchange-traded funds (ETFs). His research has been funded by the National Science Foundation (NSF), and published in journals, such as Mathematical Finance, Finance & Stochastics, Quantitative Finance, and SIAM Journals.

#### IAQF-Thalesians Seminars

The IAQF-Thalesians Seminar Series is a joint effort on the part of the IAQF (formerly IAFE) and the Thalesians. The goal of the series is to provide a forum for the exchange of new ideas and results related to the field of quantitative finance. This goal is accomplished by hosting seminars where leading practitioners and academics present new work, and following the seminars with a reception to facilitate further interaction and discussion. The seminar series is limited to IAQF and Thalesians members only.

### IAQF-Thalesians Seminar (New York) — Dr. Andrew Kalotay — Tax-Efficient Trading of Municipal Bonds

Andrew Kalotay

#### Agenda

Thursday, May 14, 2015:

#### Venue

NYU Kimmel Center, Room 914, Kimmel Center, 60 Washington Square South, NY 10012, NY

#### Abstract

Although tax-loss selling is widely recognized as a potential enhancer of after-tax return, it is usually employed opportunistically, rather than as part of a comprehensive investment strategy. In particular, little attention is paid to determining the optimum time to execute, given transaction costs.

Municipal bonds provide an ideal asset class to appreciate the benefit of active tax management, because the tax-exemption of interest by itself does not guarantee tax-efficient performance. We will present a dynamic approach to maximize after-tax return, which includes structuring of the portfolio and optimizing the timing of trades. The key insight is that the right to make a tax-driven trade is a (tax) option, which is acquired automatically and at no cost with any purchase. The value of this option can be rigorously determined. Selling and reinvesting entails swapping the associated options. Thus the sale decision should factor in the net loss of option value. Our dynamic strategy is expected to improve after-tax return over buy-and-hold by 30-80 basis points annually, depending on the duration of the portfolio and on investor-specific considerations. The approach can be adapted to other asset classes, including common equity.

#### Speaker

Andrew Kalotay is a leading authority on the valuation of bonds and interest rate derivatives. He is a prolific contributor to the literature on topics ranging from advance refunding to tax-neutral valuation and tax management of municipal bond investments. His firm licenses fixed income valuation software and provides debt management advisory services.

Before establishing Andrew Kalotay Associates in 1990, Dr. Kalotay was with Salomon Brothers. Prior to Wall Street, he was at Bell Laboratories and AT&T. On the academic side, he was the founding director of the graduate Financial Engineering program at Polytechnic University (now part of NYU).

Dr. Kalotay holds a B.Sc. and M.Sc. from Queen's University and a Ph.D. from the University of Toronto, all in mathematics. He was inducted into the Fixed Income Analyst Society’s "Hall of Fame" in 1997.

#### IAQF-Thalesians Seminars

The IAQF-Thalesians Seminar Series is a joint effort on the part of the IAQF (formerly IAFE) and the Thalesians. The goal of the series is to provide a forum for the exchange of new ideas and results related to the field of quantitative finance. This goal is accomplished by hosting seminars where leading practitioners and academics present new work, and following the seminars with a reception to facilitate further interaction and discussion. The seminar series is limited to IAQF and Thalesians members only.

For older events, please see The Thalesians Quantitative Finance Seminars.

# Puzzles

## Masses and Buckets

You have M masses, $m_1, m_2, \ldots, m_M$ which you want to distribute across N buckets "as uniformly as possible". By this I mean that you are trying to minimise $\sum_{i=1}^N \sum_{j=i}^N (b_i - b_j)^2$, where bk is the sum of the masses in the k-th bucket. How would you achieve this?

To make this a little bit more concrete, suppose that I give you 20 masses, e.g. 23, 43, 12, 54, 7, 3, 5, 10, 54, 55, 26, 9, 9, 43, 54, 1, 8, 6, 38, 33. There are 4 buckets. How would you distribute the masses?