Archive for the ‘Bonds’ Category

Gambling and the Stock Market

Tuesday, July 22nd, 2008

What happens when you talk to other people about either gambling or playing in the stock market? I’m not talking about if you do, or why you don’t, but the kinds of conversations along the lines of how the two of you are doing in either endeavor, and the words people use to describe each others situations.

Now, for the sake of argument, I’m talking about two people, who are not wagering on the same thing and especially not against each other. An example would be a roulette player who has been dabbling in financial stocks and a blackjack player who likes his tech stocks, but really, any combination will do.

Once people start talking about gains and losses, and when the gains or losses are somewhere between a nice vacation and a few months rent, I’ve always found the vocabulary rather interesting.

Think of $5,000. And think of it from the perspective of someone where thats “a lot of money” but not enough to either get evicted or buy a new car, depending on if your up or down.

If you lost $5,000 in the stock market in two days, you’d be “unlucky”, (if not very unlucky), since well, it happens, and thats just part of of the game. You can’t control it and sometimes the market just goes against you for no reason.

Compare that to what would happen if you lost lost that five grand playing playing craps. Your friend isn’t just going to talk about being unlucky but also how you’re an idiot for letting it get that bad and going that far.

But what about the other way? Make a few grand in the stock market, and the conversation trends towards how you did it, the reason you put on whatever position you did, and basically just how smart you are.

And if you won it playing roulette? You were really lucky that night.

It strikes me as interesting that when it comes to investing you’re going to end up either a genius or just unlucky, while after a long weekend in a casino you’re either a moron or one lucky son of a gun.

Same amount of money, both are largely up to chance, but they both use very different vocabularies depending on if you are up or down.

What I’ve been up to so far.

Friday, May 2nd, 2008

I’ve been trying to toy with the QuantLib library for the last few weeks, but didn’t get a chance to do it seriously until very recently. I would put an object together, call a few functions, that kind of stuff. I never got quite to the point where anything worked enough to check the output of anything. I actually spent more time putting together a database of all the outstanding Treasury obligations than I did toying with the actual functionality of that library.

That’s largely because at each step along the way I ran into issues. Getting QuantLib set up meant that I needed to get the Boost library working properly. Getting the new version of Boost working properly meant that I actually had to understand what was going on in Cygwin. Cygwin being the UNIX-in-Windows-environment that I’m using as my development platform.

It’s like an onion. You want to do one little thing, and you spend three times as long just getting ready to start.

As for that database, I do know just how boring that sounds. But that was just a quantifiable set of data that I could use to test that my instillation of MySQL was working properly. You know, after I got MySQL server installed on my 5 year old laptop, figured out how to used the gui administration tools, defined a database, designed the table to put the data into and spent an hour on the TreasuryDirect site downloading the list of active securities.

The part I haven’t mentioned is that in order to access the MySQL data in my C++ programs, I need the MySQL C library built, and then need to get the MySQL++ wrapper library working on top of it. Which is does. Now. Finally.

So long story short, I’ve been a bit of a computer nerd in the last few weeks. At one point I thought this would take me a day, two at most. This was in early April. I really just finished last Friday.

Ah well. The data is here, my programming environment is ready, and I actually have the first example program working.

That’ll be my next post.