Economics #6: Fiscal Policy

In 2009, as economies around the world faced the prospect of economic collapse, massive packages of tax cuts and spending were enacted to halt the decline. In the United States, President Barack Obama signed the American Recovery and Reinvestment Act, which over three years would spend about 6% of the countries GDP split between tax cuts and infrastructure projects.

The idea was simple, if there is slack in an economy (idle factories and workers), then the Government can borrow and spend to close that gap. Flash forward to 2011, at the height of the euro crisis, when a similar economic contagion was spreading throughout Europe. This time, the response was a packageĀ  of bail-outs contingent on imposing strict fiscal discipline in the troubled countries. The idea was also simple, recklessness had brought about the crisis, so discipline should help fix it.

If these responses seem contradictory, they should. In both cases, some economists argued for fiscal stimulus, some for fiscal austerity, and each side had their own evidence which ultimately boiled down to how they modeled something called a “fiscal multiplier”.

Continue reading “Economics #6: Fiscal Policy”

Advertisements

Programming #6: Shortest Path Problem

Now that we have some of the programming basics under our belt, we can start using them to solve problems. Let’s start with one of the most famous problems in computer science, the shortest path problem.

As the name implies, the shortest path problem is about finding the shortest path in a graph. Imagine that we have a graph that represents our home town. Vertices or nodes would represent locations, and edges would represent streets connecting those locations. For simplicity, let’s say that each street goes both directions (undirected graph). We can also add weights to each edge that tell us the distance between two locations along a a given street. In this example, the shortest path would be the path between two locations, where the sum of the distance between streets is as small as possible.

Continue reading “Programming #6: Shortest Path Problem”

Investment Theory #14: Performance Measurement

This is the first post in a three-part series on investment performance evaluation. The series is broken up into three parts: 1) Performance Measurement, 2) Performance Attribution, and 3) Performance Appraisal.

Why all the fuss? Why not just look at a portfolio’s change in value and be done with it? Do we really need a three-part explanation? Maybe not, but performance evaluation allows us to examine the effectiveness of our investment process. This feedback loop gives us a systematic way of judging our decisions and improving on them, which is what investment theory is all about.

Today’s post deals with performance measurement, which is the procedure of calculating returns for an investment account. It’s the boring math part, but it is also the starting point for all other analysis.

Continue reading “Investment Theory #14: Performance Measurement”

Programming #5: Graphs

Imagine that we want to represent a social network in a data structure. A connection between two people will imply that they know each other. With what we have discussed so far, trees jump out as the obvious way to represent connections between nodes. But recall that a tree does not allow for cycling, i.e the bottom of a tree can’t be connected to the top. With a social network, this structure doesn’t make sense.

A graph on the other hand allows for cycling. There is no root node like with a tree, instead everything is connected in a web. In the social network example, names of people would be the vertices/nodes of our graph and each line connecting two vertices would be an edge.

Continue reading “Programming #5: Graphs”