Monday, March 18, 2019

Drawing economic models on macOS with GraphSketcher (using free open source software!)

The most popular source of traffic for this blog is university students: I can't imagine people trying to write chess simulators in C voluntarily, but it's still one of my most popular blog posts each month. I didn't think posting any of my university assignment explanations from ten years ago would be popular; to use economic parlance, I thought the demand curve for my posts would be as flat as sales of Windows Phones. But the recurring cheques from Google AdSense seems to disagree with me, so I'm going to start posting my answers to economics assignments because none of the questions or answers have changed in last 129 years since Alfred Marshall's Principles of Economics.

Principles of Economics (1890).
Amazon did not exist in the year 1890 so students
had to purchase over-priced textbooks in person.

If you're an economics student, you're going to have to draw a lot of models. If you have a Mac, there's only one tool you need for graphing success: GraphSketcher. This is a free and open source tool that was originally designed by The Omni Group (the team behind OmniGraffle or "better not quite Visio for Mac").

Download: GraphSketcher for Mac

Here are some tips for great success.
  • Don't use the graphing function in Microsoft Excel. You'll spend too much time trying to create the "correct" source data to generate the curves, and you've only got till morning to submit your assignment.
  • Don't use Photoshop. You'll spend too much time messing around with layers, and trying to crack Photoshop.
  • Label your axis. Specify the unit of measurement too, e.g. Private spending ($ billions)
  • Use double lines to denote a jump in the axis.
  • Use big dots and letters to draw attention to "before and after". Tell the story with your model. In the example below, A is the normal level of private spending/real GDP. B is what happens when we private spending is reduced, and C is what happens when it's increased.
  • Use arrows to tell stories about your model. The lecturer/TA is a busy person: they are trying to trying to test you (and 250 other students) understanding of a model. They will spend 1 second looking at your graph to judge this. If private spending goes up, what happens to real GDP? You may know the answer, but can you demonstrate to the lecturer/TA that you understand using only a graph with no associated written or verbal explanation? In the example below, it's clear that when (C+I)0 shifts upward to (C+I)2, this intersects GDP curve at a higher level. We indicate this with an 2 arrows: an upward arrow for the (C+I) curve shift, and a right arrow for the real GDP shift.
  • Put a zero on your graph. No zero? One mark deducted!
I've uploaded some of my old graphs to get you started.
  • Aggregate expenditure/output approach [download]
  • Consumption Schedule graph [download]
  • Investment demand curve with shifts graph [download]
  • Investment demand curve graph [download]
  • Net Exports schedule graph [download]
  • Increases in price level graph [download]
  • Inflationary gap graph [download]
  • Built-in stability graph [download]

Aggregate expenditure/Output approach [download]
Consumption Schedule graph [download]
Investment demand curve with shifts graph [download]
Investment demand curve graph [download]
Net Exports schedule graph [download]
Increases in price level graph [download]
Inflationary gap graph [download]
Built-in stability graph [download]

Friday, September 8, 2017

IT architecture and the environment: you, yes, you can make a difference.

Every cloud and IT architect can make a difference to the environment. We don't need to wait for feel good news about a solar or hydro project. There's a quantifiable cut in energy consumption when you select the correct CPU, design an hot aisle correctly, cache results closer to the requester, or optimise a query.

How much power has been saved by VDI/thin clients? We need to improve our communication skills: while a hydro plant/wind farm is noticeable ("looks big, must be good!"), the nature of our work makes it's difficult to communicate the benefits. Your DC went from PUE 1.3 to 1.2? Great! Is that the equivalent of rolling out 10,000 solar panels or turning the kitchen light off? You optimised a query? Fantastic! How many times does that query run per day, how much can the server be downsized, and what is the corresponding energy saving?

If we don't appreciate our own capabilities we will become the status quo we despise: expansion for the sake of budget, trading off perceived risk for inefficiency and waiting for someone else to fix our demand-side power inefficiencies with supply-side solar. The good news is that every IT architect can be the change they want to see. The bad news is that not every IT architect knows that.

Thursday, November 24, 2016

Excel formula for calculating stamp duty in Australian Capital Territory (ACT), Australia (that's where Canberra is)

Excel runs the world. If Microsoft removed nested IFs in Excel, every taxation system would transition to a flat rate overnight. Here's a stamp duty table for properties in Canberra, clearly constructed by someone who loves Excel.

I live one quarter my life in Excel, a quarter in Word, Visio and PowerPoint.

This is taken from the official ACT Revenue Office (that's state revenue, not federal). The Excel formula representing this table is as follows:

If you rely on this formula for critical financial decisions without testing it yourself, you're nuts.

Tuesday, November 22, 2016

Excel formula for calculating stamp duty in Western Australia (WA), Australia (that'd be where Perth is)

If you want to buy property in Western Australia, it's helpful to understand stamp duty liability.

Location of Perth, according to CNN.

This formula replicates the WA Department of Finance stamp duty calculator. It assumes you're an Australian citizen, aren't eligible for concessions, and are purchasing a residential property.

However, the stamp duty calculator rounds to the nearest 100. Hence, a $1000 property will have the same liability as a $1099 property. Here's another formula that calculates liability exactly, as per the WA schedule of rates

Pick whichever one makes your wildest property fantasies come true. I hope it goes without saying that you should test an Excel formula you found on the internet before making actual financial decisions. It is entirely possible for the WA government to change the stamp duty rates 3 seconds after you read this blog post.

Monday, November 21, 2016

Excel formula for calculating stamp duty in Tasmania (TAS), Australia (that'd be where Hobart is)

Here's my Microsoft Excel formula for calculating stamp duty in Tasmania (TAS), Australia.

The output of this formula doesn't match the official Tasmanian State Revenue Office's calculator, because their calculator only "rounds" the input to the nearest $100.

Example: if you enter $100,000 into the official calculator and the Excel formula, they will match. However, if you enter $100,001, the official calculator will say $2438.50 and the Excel formula will say $2435.04. In fact, if you enter any figure between $100,000 and $199,999, their calculator will give the same response. I'm not sure whether the Tasmanian SRO round their inputs to the nearest $100, or whether they follow the letter of the law when calculating liability.

I've created an additional Excel formula which replicates the behaviour of the online calculator.
You're free to pick which one you like. Either way, the maximum margin of error for this formula will be $4.50 (the liability from the highest range). If an inaccuracy of $4.50 bothers you, perhaps you shouldn't be in the property market!

Standard disclaimer applies: do not trust this formula until you have tested it yourself. It makes all sorts of assumptions like you are an Australian citizen and are not entitled to any concessional rates.

Sunday, November 20, 2016

Excel formula for calculating stamp duty in South Australia (SA), Australia (that's where Adelaide is)

Because I'm a completionist, I feel the urge to write Excel formulas to calculate stamp duty for every state in Australia. Here's the formula for South Australia from Revenues SA.

Unlike other states, Revenues SA calcualate liablility to include cents. Hence, no ROUND() in this formula.

If you're trusting an internet stranger's formula without comparing it with the official SA stamp duty calculator, you're nuts. The intent of these formulas is to calculate ballpark stamp duty.

Saturday, November 19, 2016

Excel formula for calculating stamp duty in Northern Territory (NT), Australia (that's where Darwin and Alice Springs are!)

There are 244,300 people in the NT, which is about the population of "Foxconn City" in Shenzhen, China. Darwin has the lowest population density of any capital city (43 people per square kilometer), compared to a Sydney train which can hold up to 4.3 people per square meter.

Here's an Excel formula for calculating stamp duty in NT.

The official calculator rounds to the nearest 5 cents, so I've used MROUND() to achieve the same.

Usual disclaimer applies: these Excel formulas are designed for quick ballpark estimates of property stamp duty pricing. Though they are accurate, you would be wise to confirm important calculations yourself with the official NT stamp duty calculator.