TL;DR: If you’re a scratch player, Heroic Tavern Brawl has a slightly higher expected value than purchasing an equivalent amount of packs in the store. However, it has far less value than purchasing the same number of packs via gold.
My little brothers introduced me to Blizzard’s Hearthstone about a year ago. It and Factorio are the only games I play these days. If you have no idea what I’m talking about, then click here.
Today, Blizzard announced a new week-long mode called Heroic Tavern Brawl. For an entrance fee of $9.99 (or 1,000 gold), players are allowed to construct a deck and play in a makeshift tournament until they achieve either 12 wins or 3 losses. The more you win, the better the rewards.
Is it worth playing? I crunch the numbers in this Excel Book and explain below the fold. If you download the file, you can customize the calculation to your own situation.
Continue reading →
I’m happy to announce a new series of pages: Analyzing Technical Analysis.
I frequently read people talking about Moving Average Crossovers, Bollinger Bands, Relative Strength Indexes and other indicators that allegedly allow traders to beat the market. The default algorithm at QuantConnect uses volume-weighted moving averges to beat the market. A few weeks ago, my Uber driver told me he uses Average True Ranges to trade the currency market.
It’s hard to believe all these strategies are being discussed if there’s nothing there. Then again, it’s also hard to believe a successful currency trader would drive Uber.
This series of posts is an attempt to rigorously and thoroughly check the effectiveness of technical analysis indicators through a series of iPython notebooks. In the notebooks, I’ll do my best to set my biases aside and objectively test the facts. In posts such as these, I’ll share my conclusions.
In the initial block of posts, I tested how returns react in the days after moving averages cross each other and when prices “bounce” off moving averages. (Click here for results and here for a guide to interpreting results.) In every strategy for every horizon, nothing close to statistically significant returns are observed. The strategies failed so spectacularly, I almost felt guilty about making my computer subset white noise so many times.
Regardless, it has been a good exercise. The past two weeks haven’t taught me how to beat the market, but I did finally have a good excuse to make the jump from R to Python, I learned how to perform bash scripting and I developed an objective way to test trading strategies.
With some luck, the next strategy I try will make me fabulously wealthy.
Write like a freight train.
Try to remove “that,” “had” or any of its derivatives. “You’ll find that you can often live without them.” vs. “You’ll find you can often live without them.”
Actually, remove every word you can. You can live without them.
When possible, place adjectives and adverbs before the words they modify. Be on a continuing mission to boldly split infinitives which have never been split before.
A colorful word is better than a colored word. When possible, replace adjectives with meaningful nouns and adverbs with meaningful verbs. “It’s a big mess.” vs. “It’s a debacle.” “Fournette ran hard through the line.” vs. “Fournette muscled through the line.”
Deliberately use adverbs. Long, descriptive, meaningful chains of modifiers can subtly and delightfully overwhelm the reader’s working memory. If you want your readers to process with abundant attention, dutifully remove adverbs. If you want your readers to be gleefully hypnotized, happily unpack your favorite adjectives and adverbs. Continue reading →
As you probably know, there’s a very useful Excel formula called
VLOOKUP() which allows you to reference lookup tables and return the appropriate value.
On an Excel user support forum, I had previously linked to some formulas that provided “fuzzy” vlookups. In the event a perfect vlookup match couldn’t be found, the custom formula
FUZZYVLOOKUP() returns the closest match available. The post has since 404’d, so I was asked to rehost them.
Click here to download a sample workbook.
If you open up developer mode, you’ll see a code module containing two custom functions:
FUZZYVLOOKUP(). The former compares two text strings and returns a numerical measure of how similar they are (1 is perfectly similar, 0 is completely dissimilar). The latter iterates the likeness formula across a lookup table and returns the appropriate column of the best match. Both of these functions are demo’d below:
Please note that
FUZZYVLOOKUP() uses four arguments:
- The lookup value.
- The lookup table.
- The column from the lookup table you’d like to return.
- The minimum acceptable likeness. (In this example, I used 0.2).
Now that football’s over, I’m about to enter my annual “What should I do with my weekends?” phase. Before that, I’d like to revisit my predictions under the cold light of morning (but not the blue light of mourning). If you’re not interested in the Super Bowl, here’s a video of a Superb Owl. More math posts are on the way.
On January 27th I wrote a six point list entitled “Reasons the Pats will win.” Let’s see how I did in hindsight. Continue reading →
This post is part of the “Matrix Multiplication in Excel” series. It’s composed of a math introduction, a silly interlude and an interactive tutorial (you are here). By the end of the series, you’ll learn how to perform Markov Chain calculations, which are used in some damage calculations.
Now that we know some of the basics, I’m going to introduce a toy problem where one would use matrix multiplication, step through how to calculate it in Excel and then give an example used forensic economics.
Click here to download Matrix Multiplication.xlsx.
Scenario 1: Ping Pong Problem
Suppose two ping pong players (labelled left and right) are tied near the end of a game. In order to win, one of them has to have a two point lead. Suppose that, on any given volley, the left player has a 55% chance of winning.
The game can be thought of as having five states:
- (2,0) – The left player wins.
- (1,0) – The left player is winning by one.
- (0,0) – The game is tied.
- (0,1) – The right player is winning by one.
- (0,2) – The right player wins.
Graphically, the transitions between these states can be seen as follows.
The left player increases his score with the probability , in this case 55%. How do we calculate the probability that the left player wins? Continue reading →
This post is part of the “Matrix Multiplication in Excel” series. It’s composed of a math introduction, a silly interlude (you are here) and an interactive tutorial. By the end of the series, you’ll learn how to perform Markov Chain calculations, which are used in some damage calculations.
Trigger Warnings: Authorial Self-Insertion, In Medias Res, Movie References, Fake Trigger Warnings
Just a few days ago, I had been lying on my back, surrounded by doctors, atrophied and struggling to gasp for breath. This man wanted billions of humans to experience the same process. A note of discord rang through my heart as I tried to imagine the whole of humanity simultaneously squinting as they adjusted to their new eyes.
Morpheus misinterpreted my discomfort and didn’t miss a beat. Continue reading →
I recently answered the following question on Quora:
What are the strengths of Coasian Bargaining?
Coasian Bargaining says that agents can negotiate away the effects of externalities if transaction costs are sufficiently low. Ideally, this will lead to an efficient outcome.
Suppose you want to drill an oil well that will make you $100. Suppose it’ll make the lives of 20 neighbors $1 worse. How is this problem approached in different countries?
- In Non-Coasian Anacapistan, you drill the well and create $100 of personal utility and $80 of total utility. The twenty neighbors are $1 worse off, but they all read Ayn Rand, flex their forearms, and carry on with their grim resolve to build the kind of buildings they want to build.
- In Coastopia, the neighbors say you can drill the well iff you pay them $2 each. You drill the well and gain $60 of value. The neighbors gain $1 of value each.
- In Coasistan, the neighbors demand $6 each. The well doesn’t get drilled. No one wins except for the lawyers who negotiated the failed deal.
- In StatusQuoVille, the neighbors all vote on whether or not the well should be drilled. Depending on who shows up to the polls, it’s either drilled or not. The winner takes all, and everyone hates each other.
Coastopia is clearly an unrealistic fantasy, but it has some enviable features and real-world take-aways. In my experience, those who spend time thinking about Coasian Bargaining are more likely to be impartial when assessing real-world externalitites. While some are quick to say that fracking should be outlawed because it disturbs the locals, those from the Coasian school of thought will consider other possibilities. Maybe oil companies should pay money to the locals. Maybe locals should pay oil companies to not drill. Maybe oil companies should pay locals to move. Coasian bargainers are more likely to consider creative solutions rather than simply banning productive economic activity of which they disapprove. This leads to more economically efficient outcomes. In my toy example, the drilling clearly should happen. Any outcome that doesn’t result in a new well misses out on $80 of total utility.
All that said, I wouldn’t want to live in Coastopia. Incentives work both ways, and you wouldn’t want to live in a world where the prevalence of Coasian Bargaining encourages potential externalizers to seek out situations to threaten. “That’s an awfully nice stream you have there. It’d be a shame if someone were to dump runoff into it. Perhaps you should pay me to threaten someone from the next town instead.” On net, the average man’s distaste of naked Coasian Bargaining may be a good thing.
In DanielMorganTopia, all questions like these are solved through Pigovian Taxes, an approach which doesn’t require perfect bargaining and has decent efficiency if the government is reasonably competent. But I don’t rule the world. Not yet.
I was asked to review another forensic accountant’s workpapers as a part of a consulting engagement. When I received the file, it totaled over 18 MB. By making a single change, I was able to lower its size to 53 KB. The next time you come across an oddly bloated Excel file, follow these steps.
- On each sheet, press Ctrl + End. This moves the cursor to the last cell Excel stores. In this case, one of sheets took me to column BO, row 1,048,576. Although only the first 39 rows contained meaningful data, the remaining rows stored formatting information, which Excel dutifully saved.
- Select all rows you don’t need (in this case, I pressed Ctrl + G and entered “40:1048576”) and delete the information (Ctrl + –). Make sure you select and delete the entire row / column as appropriate (Shift + Spacebar and Ctrl + Spacebar, respectively).
- Enjoy your faster load times and lower storage costs.