Backtesting Basics: Getting Started with Zipline
Nov 02, 2019
This post describes how to use the Python package zipline to backtest an equities trading strategy. Backtesting is the practice of evaluating a trading model or heuristic against past data. Although past performance is no guarantee of future performance, practitioners generally feel more confident in strategies which would have performed well had they been executed in the past (given information available at the time). Another excellent reason to use backtesting is to catch conspicuously bad mistakes (e.
...
➦
Expected Shortfall in a Prediction Market Setting
Sep 08, 2019
How bad can things get? A risk measure provides an answer.
Suppose you are presented with a wager costing 0.4 which returns 1 with probability 0.5 and otherwise zero. Such a wager has an expected return of 25%. You can make this wager once a day over the next 10 days. Suppose you do. How bad can things get? We know that there’s a small probability (\(0.5^{10}\)) that you lose 4 (i.
...
➦
Virtues of Prediction Markets: Useful Baselines
May 31, 2019
Participation in prediction markets has a social benefit: a market’s prediction provides a useful baseline against which other predictions (outside the market) may be judged. A market’s prediction can also be useful to individuals making decisions that depend on the outcome of the predicted event. In both cases, the social utility provided by the market remains even if the market’s prediction is not perfect. The market is useful even if it only provides a general assessment of the relative probabilities of different outcomes.
...
➦
Are there Sure Bets on Preidction Markets (such as PredictIt)?
May 13, 2019
Are there bets with guaranteed positive return on the prediction market PredictIt?
Yes and no. “Yes” because examples of such bets do exist. “No” because these bets have negative present-value adjusted returns. (Bets with guaranteed positive returns are called “sure bets.”)
Here is one example of a bet which does indeed have a guaranteed positive return. During the spring of 2019 (e.g., April 28 to May 2) you could purchase two contracts in the 2020 U.
...
➦
The Present Value of a Bet's Payoff
May 10, 2019
Future income flows should always be expressed in present value terms. This practice is as important in the prediction market setting as it is elsewhere. The payoffs on winning prediction market bets frequently do occur many months from the present. Indeed, it is not uncommon to see prediction market bets concerning events that might occur two or more years in the future. If the wager was made using a currency which experiences inflation, then the payoff should be discounted to reflect the change in the value of the currency.
...
➦
The Riskiness of a Bet in a Prediction Market
Apr 22, 2019
Some bets are riskier than others. Consider the following two bets: (1) a gamble costing 0.45 on the outcome of a flip of a fair coin paying out 1 if the coin lands “heads” and (2) a gamble costing 0.75 on a die roll paying out 1 if the die shows a number other than six. The first gamble (on the coin flip) has a healthy expected return of 11%. This is the same expected return as the gamble on the die roll.
...
➦
The Expected Return on a Bet in a Prediction Market
Apr 01, 2019
The return or rate of return is the standard way of characterizing the benefit associated with making an investment. The return on an investment is calculated by dividing an investment’s net payoff by the cost of the investment. A bet on a prediction market is a kind of investment. Comparing bets in terms of their returns allows us to ignore irrelevant details and focus on the relative benefits of bets.
...
➦
Bids, Offers, and the Bid-Offer Spread in Prediction Markets
Mar 17, 2019
A market is a tool for matching buyers with sellers. Electronic markets are a particular kind of market. This note introduces three concepts used in virtually all electronic markets in the early 21st century: bids, offers, and the bid-offer spread. This note discusses these concepts in the context of a prediction market, a particular kind of electronic market.
Sellers post offers to sell a quantity of a known product at a specified price (e.
...
➦