Design a site like this with WordPress.com
Get started
Featured

An Idea Is Born

FinancialGames.org gains its first student

The quickest way to double your money is to fold it over and put it back in your pocket.

— Will Rogers.

What’s before beta testing? Before crashing your computer stops being all but assured with one wrong button click. Crash testing, helmet not included. My partner’s 12 year old daughter was the test subject. The goal: to view my fledgling web based video game through the eyes of its target demographic. Would the subject of finance be so dry and intimidating that she would run from the console screaming? Or worse, yawn and ask if she can go play a real video game? Either would have been crushing. She let me sit beside her during the process. I explained the basic objective and how to navigate the options. I’ll admit that my excitement sent me into the same over-explaining mode that would usually incur an eye roll or deadpan stare. In a moment of intense self-awareness I asked her if I should leave her to it, expecting a stern yes. But something magic happened: the screen had her rapt. And more! She began asking me additional questions. Asking for guidance. Should I buy this or that? How do I decide? How do I get more money? Should I end my year? And when answers were given new questions were asked. Good questions. Ones that led to new features in future versions to make the player’s experience what it should be… what it was meant to be: fun. I’d done it. I’d kept a pre-teen’s attention with something both voluntary and educational. And what’s more: a subject riding dangerously close to math, which in previous semesters held a special place in her hatred. Although it was a small victory, it would be one of many along the way. And I’ll always look back on it as stand-out the most important.

Advertisement

Paying for Value

“How did you go bankrupt? Two ways. Gradually, then suddenly.”

— Ernest Hemingway, The Sun Also Rises

After the first test was complete, I decided my game was absolutely addictive to youth, and sure to be the hottest new investing simulation to hit the shelves. So I was thrilled, but not entirely surprised when my subject asked if she could play again the next day.

We programmers have a tendency to draw conclusions that everything is going fantastic based on limited test results. “Short-circuit evaluation” mindset, let’s call it: hey, it worked the first time it ran! Mic drop. Nailed it. Guess I’ll move on to a new module. It’s not always bad to assume the best. It keeps development rolling. Testing can really be a drag. It derails the whole mojo. It stifles creative pace. But circling back to test is essential, and the more complex the program, the more testing is required. Mine was a stout 14 files of code.

Things had gone exceptionally well. Technically speaking, no problems were found. No glitches, calculation errors, or otherwise catastrophic failures. But the data suggested a problem: by the time my subject reached the “game over” screen, she was nearly a billionaire (with a “B”). Now, she’s incredibly smart. It’s not a knock on her. But I couldn’t help but wonder if I’d made things too easy. As an avid gamer, she was quick to find opportunities to exploit. But she didn’t even really need to in this case. She just repeated the same couple of moves that rewarded her the first time. They always worked, like she had the Midas Touch. That’s not real investing. I’d done her a disservice.

I used the opportunity to recalibrate a few things. Spending money was tighter this time, and rates of return on investments a bit smaller. Then I left her to it. A few minutes later I got a text from the other room, “This is NOT good!! IM IN DEBT!! (On the game)”.

I rejoined her. “What happened?”

“Well, everything was going fine, but I really wanted to buy this property. It was going to take a long time to get, so I just took a loan. But when I did, then I didn’t have enough cash to pay the interest. So I took another loan to be able to keep up on the interest. Now the interest is even bigger, and I have negative cash! What do I do?”

“The only thing you can do: sell whatever you can to dig yourself out of the hole. That will ease the bleeding.” I went on, “look more closely at what you’re paying for. If you take a loan with 10% interest to buy an investment that will give you only 6%, well, you just promised to pay 4%. That’s not going to make you money. That’s how you lose it.”

Warren Buffett put it more succinctly: “Price is what you pay, value is what you get.” Bottom line: make sure you’re getting your money’s worth!

I left again. A few minutes later, though, my curiosity got the best of me. I came back to find her debt free, but she’d aged 20 years!

“How’d you play so fast?!”

“Well, I could only pay the loan a little each year, so I just clicked and clicked and clicked “end year” without doing anything.” It appeared that she’d been doing some short-circuit evaluating of her own.

I had mixed emotions. My heart went out to her when I realized, just like the rest of us, she hated being in debt. She wanted out as quickly as possible. No one wants someone else spending their money before they earn it. While I wanted to feel proud of her for bearing through the struggle, she let that struggle blind her to any and all opportunities along the way. Twenty years slipped by in which she could have done more with the little she had, even at a disadvantage. Here she was, now only ten years from a forced retirement, and she’d saved only 50,000 or so. Would she have enough saved in time before then? It wasn’t clear.

This is a situation all too real for many these days. Guaranteed pensions are the exception to the norm, and social benefits aren’t guaranteed to the children of today with ever rising government debts. With over 20 trillion and counting, every man, woman, and child currently owes around 60,000 to the U.S. Government’s lenders. That’s more than an average U.S. family has saved. Who, after all, will pay them off? Bottom line, saving for retirement is not easy, but it is essential. It is not fast either. There are rarely shortcuts. And the brutal truth is there’s no easy way out of debt. It requires patience, hard work, and resourcefulness. The math suggests there will come a time when each retiree is required to pay for their own retirement as well as someone else’s, if not several others. How will we ensure our children can be prepared for that responsibility?

Market Making

“Money is only a tool. It will take you wherever you wish, but it will not replace you as the driver.”

— Ayn Rand

How do you simulate price change? How do you make prices go up and down the way that markets do? Answering this question was my first great task before I could even start building a game that included a market.

It can seem like a trivial question if you start with the assumption that the answer is simple: the market is random. If it wasn’t, then everyone would be rich. Sometimes it’s up, sometimes it’s down. You never know. And while this is true, it’s not the whole truth. To view the market this way is to forget that it is not made up of products or services or even money. That’s just the stuff passed back and forth. The market, on the other hand, is created by, and continues to exist because of, and consists 100% of… people. And people, all people, unless making a concerted effort, exerting great focus to stay random, making randomness their full-time job in fact, will slip into a pattern, a routine. And even then, most of what they do would still be fairly predictable. We are all on autopilot for an alarming percentage of our waking hours.

This became immediately obvious when I used random numbers to be my first “version” of a stock market. It was insane. One year it was up 50%, the next down 80%, then back up 90%, then down another 70%! A roller coaster ride that would rattle even Warren Buffett to his core. Investors would run screaming. Entire market segments would be unemployed. Wall Street would be losing its mind.

So how does a programmer simulate a market? That’s easy, just grab historical prices from the internet, plug, and go. But here was the rub: even a simulated market is still made of real people. The real people in this case are the players. It wouldn’t be long before they figured out the pattern, checked it against history, figured out where it was headed, and let everyone else know.

I slept on the question for a few nights. The mechanism behind a price is so incredibly complex. It’s instantly updated by innumerable factors just as fast as information passes between participants. I could code for years and not create a truly realistic market. Then one morning it occurred to me: I don’t have to. I’m not an economist or financial genie. I’m just a programmer. And it’s just a simulation. It needs no brilliant predictive calculation. A simple approximation would suffice. So I settled on a balance between the two: random and pattern.

We as programmers need to start at the end: our goal needs to be known before we can design a solution to reach it. So I made the assumption that the market would, on average, go up, say, 7% per year? This seemed kinda right. I’d heard some stat like that before. Then I injected some randomness, and made each year a random number that could go above or below that 7% by a fixed limit, say, 30% above or below that. I called that upper and lower limit “volatility”. So, it could go as high as 37%+ or as low as 23%-. But over the long run, it would “average” close to the “actual” market, of 7% per year.

But I didn’t stop there. Programmers and mathematicians use a tool every day that is so incredibly powerful. The first time I used it I reveled at the–literally endless possibilities (within the laws of physics, of course): the variable. You can punch ANY number in and the computer will just go with it. And remembering that a game is for its players and software for its users, I decided to hand over the tool to the People: to let the user decide what the market would do. Why should I be the one to decide? So when the game host sets up a new game, he or she decides the “rules of the market” and plugs them into these variables, with some helpful-but-not-ironclad suggestions if they want some semblance of realism, of course.

Thus, a market was made.