Blogging Artifacts

A blog about complex systems & statistics.

Build your own AI: how to teach GPT to search the web and execute code

Large Language Models such as GPT-3, ChatGPT, Bing AI, and Google Bard have recently demonstrated stunning advances in conversational capabilities, text summary, translation, code creation and many other applications. Microsoft’s new AI-powered search assistant Bing showed how these capabilities can be further enhanced by allowing the AI agent to access conventional search engines and read … Read more

Probabilistic alpha and beta: quantifying an uncertain edge

In finance, the performance of an asset is often quantified by alpha (the excess returns above a benchmark return) and beta (the volatility or risk of the asset relative to a benchmark). In this post, we develop time-varying, probabilistic versions of alpha and beta, and go through the process of using these new metrics to build a dynamic stocks/bonds portfolio to improve on the classic 60/40 portfolio.

Talking to machines: prompt engineering & injection

OpenAI has recently publicized the API to access their Large Language Models (LLMs), allowing anyone to sign up for a free account and test the various possible applications that these powerful neural networks enable. In this post, we will: learn about the architecture and special features that make these models so versatile and powerful try out basic applications … Read more

Probabilistic programming in finance: a robust Sharpe ratio estimate

In this post, we will develop a time-varying, probabilistic extension of the Sharpe ratio as a widely used performance metric for financial assets. In particular, we devise a Bayesian regime-switching model to capture different market conditions and infer the full distribution the Sharpe ratio as it changes over time using the probabilistic programming framework bayesloop. We … Read more

Illustration of the S&P500 return distribution and 23 sigma intervals.

The 23-sigma fallacy

This is the first post of a short series of posts on extreme events in financial time series. We will investigate the return distribution of financial assets, use power-law theory to describe its tails, see how estimating higher moments such as kurtosis becomes meaningless, and finally discuss a fundamental flaw in popular models such as … Read more