Monday, December 26, 2011
Optimize for investments or salary
There is just so much on my own that I will be able to figure out on my own... then I thought about buying some advanced books to read. Then it hit me, I've got a lot of learning to do and I started to wonder if my efforts in this field would be worthwhile.
It is now also the end of 2011, meaning that my expenses spreadsheet for the year is nearly complete and I have a good idea of how much I've spent and saved for the year. Since moving out of the company dorms and into my own apartment, housing costs for me have skyrocketed and the amount saved dropped by about 33% compared to last year. This is even accounting for increases in salary. But the thing is that doing more research in stock picking may increase my investment returns by a few more percentage points. This begs the question, would I be better off investing that time in developing better skills to raise my salary?
Thus, I've started doing more research into engineering salaries and pay for jobs that I could possibly do and for jobs around the world. Thanks to the exchange rate between the yen and the dollar, the numbers look pretty good, but this is after a lot of overtime pay and travel pay that I got this year. On a dollars/hour basis, I don't think that the hourly salary was all that good.
Tuesday, December 20, 2011
Been Busy
Been really busy the last month and a bit to do any real writing, but a lot has been going on and I haven't had much of a chance to do much writing as of late. I've been flying between Tokyo and Kagoshima nearly weekly to help out with setting up an inspection machine and writing code to speed up the processes. Also, getting paid travel expenses and a small stipend is marginally nice.
On another note, I got a better than usual work review...after all was said and done, however, the better review led to only about a $600 increase in my winter bonus. The software I wrote cut down processing time by about 5 days and gave us more time to analyze data to improve the success rate of the process. If ouput and pay were plotted, the graph would be very sub-linear for the place where I work.
More notes to follow at a later time.
Tuesday, November 15, 2011
Defining the problem actually takes up a lot of time
By the time I got to Kagoshima, some of the engineers have been working on figuring out how to get the process to work and determine an algorithm for sample inspection. Armed with the basic information from these guys, I started writing software through the night shift and my work spawned into a project of it's own.
I've already finished writing an application and trained a technician to take over the job. I've started working on the next version of the program to try and have the entire process automated since my program doesn't work in some special cases. Classic example of the 20-80 rule, where 20% of the effort gets 80% of the output.
I am treading into territory where other people haven't gone into with the data analysis and I've noticed that I am spending less and less time writing code and more time trying to better define the problem and the exceptions that my code needs to deal with before writing any code. It's somewhat frustrating to not be writing code to get things done but I guess it's part of the process.
It's odd how the motion of "doing" something is so closely related to progress, though planning and preparation is also a very important part of solving any sort of problem. Being busy for the sake of being busy is detrimental. I generally like disappearing from the office when working on a tough problem that I haven't managed to wrap my head around and go for a coffee. I find that I understand a problem well, I work infinitely faster because everything is in my head and laid out.
There is something called the "drunken sailor's walk" which is a classic problem that nearly all probability courses covers at some point. After n random steps, the furthest you've traveled away from the origin is related to the root on n. If you walk with direction, the distance traveled is n.
In other words, if you plan things out properly and minimize mistakes, you'd be better off by the factor of a square. If you wonder why there can be such a gap in skill or level in the world sometimes, I think that it is the expression of this phenomenon.
For those that have the time, I suggest reading Richard Hamming's book The Art of Doing Science and Engineering: Learning to Learn, which is a fairly ok read. There are some interesting notes from a well known researcher, from which I gleaned this idea from.
Monday, November 14, 2011
A disappointing experience at a computer store
I put down the cash for server parts last Friday and so far, the CPU, motherboard, case and memory arrived. Since I was going for a server system, I didn't need a monitor or a fancy video card for the system which brought the price of the computer down considerably. When going for the slim computer case, I made the mistake of purchasing one without a built in power supply. Thinking that getting a power supply wouldn't be hard enough, I dropped by the closest physical computer store I could find online only to be incredibly disappointed-- all the power supplies were really expensive and the cheap ones that they were selling were "sold out".
Obviously, I wasn't happy with spending the 20 minute (one way) commute on my scooter to get to the store, spend time looking around to find out that they didn't have what I wanted at a more expensive price.
After getting home, the first thing I did was go online to the Japanese equivalent of "pricegrabber.com" to source a part and I was done with making the order in about 10 minutes. The only difference is that the part will probably arrive in 2 days instead of me having it immediately, but when it comes to being busy, waiting isn't a terrible thing.
Over the past few years, I have been doing more and more online shopping instead of going to stores to buy things instead. It's simply more convenient. I really wonder how much has internet shopping had impacted the retail business and the number of old school stores that have gone out of business as a result of it.
I also move around every 2~3 years making finding new places to buy things fairly important to me somewhat time consuming. Ordering online never ceases to fail me since I get what I want delivered to me quick enough. But back to the computer stores, I really don't understand how they can keep up a business where people have to spend time to go to a place to buy over priced product. The only one possible answer that I can think of is for people that aren't as computer literate to talk to people to get what they need. If that information, too, can be accessed in a manner easy enough online, I think we can kiss the big box computer retail stores goodbye.
Thursday, November 10, 2011
If this then that
An interesting automation site, I thought that the idea was interesting when they went into open beta after Sept. I checked after 2 months to see how they were doing and found that they hadn't updated the blog in 2 months. I think they're dead in the water right now and the people that worked on the site are off working on other things.
From the stock market, business and life. Things take time to happen and you should make it a habit of checking old news. So many thing that were at the front of our mind one day become totally forgotten later. I don't know why the time span for ideas is so short, but it would be wise to periodically check old news from time to time instead of just watching the latest headlines; because just tracking the new and not tracking how things go is meaningless.
Tuesday, November 08, 2011
The Autobiography of Steve Jobs
After about 3.5 days of reading on both the computer and mainly on my iPhone, I've finished the book. I read of the life of a great man. For once history will have something positive to put among heroes because there just haven't all that many in recent history.
As a person to emulate, I doubt that many people would want to be like him; but to every great man, there are key ingredients. I've turned 30 this year and work life practically ends at about 65. If you really want to make a bang at something, have kids and do everything else, there really isn't a whole lot of time. Every moment is precious and I am reminded of that after reading this book.
Never have I been so consumed with putting my mind to doing something in a long while. After reading the autobiography, you can tell it was put together with care, with countless interviews and decent writing. After finding myself so consumed with reading for the past few days, I just came to the realization at how much the internet sucks; as in "holy shit, it really sucks," because there is so much garbage out there.
Maybe I haven't been going to the right places for content but, I've gotten tired of fishing through the needles in the hay stacks of social sites looking for something good; just simply having a good read was so amazingly refreshing. Yes, I will admit there are some good reads on the internet. Some great essays out there even, but nothing as cohesive as a good book. I missed that, I really did.
The other great thing about reading about Steve Jobs is that he was incredibly intolerant of things that bothered him. I found myself to be quite the opposite recently, being as accommodating and accepting as possible that I noticed that I lost a bit of an edge to life. When you get to the point of accommodating to the sub optimal it just turns into a slippery slope of accepting worse and worse. Sometimes you just need to draw the line even if it means you might have to be an ass.
There is a lot about the book that I really enjoyed, but I feel that I would do no justice to even talk about the story because what really is the point about just saying if something was interesting or not? The act of simply talking about something just feels like it has no value to me and in it's own way is what was the story of Steve Jobs about-- making things happen.
Tuesday, November 01, 2011
To get good at the stock market, spend time away from it
Gone are those days and I've gotten better. To be honest, I think the market in general is on tilt, to use a poker term and it is probably best to leave the table as it is and take a drink while the players sort themselves out. Because really, when everyone is playing weird, you just simply can't control risk (even if you are making logical plays).
I'll admit that I had a few of the equities that I held before the crash over the summer drop by 50% percent. There were people out there talking about being glad that they got out and them going on about how much better it was for them to get out early. Some of those tragically massacred equities I held came back to nearly their original prices and I somewhat regretted not putting some more cash into the market. I can't expect to trade with 20/20 foresight and I'll take the bad with the good.
Sure I am a bit down from the market haywire but I am happy to bide my time, earn money from work and wait. More importantly, instead of waiting, have other things to do :)
Sunday, October 30, 2011
Went Jogging for the Halloween Weekend
I woke up, spent the morning doing some research, went out for a jog, came back, had a steak dinner and had the best sleep ever. I naturally woke up at 8 am today feeling particularly great. This is something that I need to repeat more often.
Spend time, doing productive things, go to bed tired from hard work and wake up great. This is how life ought to be lived.
Saturday, October 29, 2011
Deploying to AWS doesn't make sense (not just yet)
I've been mulling the thought of deploying a webserver to Amazon's AWS service as of recently and I've been running the idea through my head multiple times and something just didn't sit right. I've been playing around with a webhosting service for the past year to see what it is like to work with a webhosting service and came to the conclusion that the lack of control is a killer data portability; it is easy to create a blog and write on it, but it is a real pain in the rear to back it up and be able to move it elsewhere should I want to. The other problem is the limited control of software installation I can do, meaning that I would be completely limited to whatever the service provider has installed. This is where Amazon's AWS service comes in.
Amazon's AWS is basically a server instance that you can use, it is very much like having your own computer to play with, install an operating system and then do whatever you want with. I've been doing calculations on price for such a service and the numbers don't look favorable for a single "Small PC" instance which runs for about $744/year. At that price, I could buy a stripped down computer for far less and turn that into a usable server for at least a few years. Transitioning to AWS only would make sense if I needed signifcant computing power beyone what I would provide from home.
I'll be looking into buying a new computer to play with at home.
Saturday, October 15, 2011
Rusty Debating Skills
I, unfortunately, have not developed my Japanese debating skills and for the lack time spend among English speaking peers in Japan, I have found that my debating skills gone rusty and the "thick skin" that one needs to survive a debate has also gone thin. In effect, I believe that I've lost some mental agility and stopped keeping a pool of readily accessible information in my head to make arguments because I've had no need to before. Information retention is terrible at the moment, though some might attribute this to the aging effect, I refuse to accept that as an excuse.
Especially when it comes to dealing with upper management, when making persuasive arguments is especially important for these people to sway executives and push their career upwards. If you want to do well in a career, having good debating/persuasive skills (balanced with it not being aggressive) is absolutely important.
To be honest, I miss my old philosophy class in high school where we used to debate on a variety of topics at 7 am. Sure we would be sleepy as hell, but it was a lot of fun back then.
Playing with some new styles
Wednesday, October 12, 2011
Kick ass and then become a consultant?
Into the second week of October and already cranked out more than 20+ hours of over time. If this was Canadian style flex time, I'd have 3 vacation days stocked up. But this is Japan, so I'll be taking overtime pay instead.
Been working on putting together some software for a project for wafer level analysis. I use a newer language compared to the older guy I work with, Visual Basic vs Python. Programming lightening fast while I have most of the base engine of my detection engine up.
The problem here is that by the end of this year, my stint in Kagoshima will probably be over and my work will need to be passed off to the guys here to continue. The problem is that no one can program in the language that I use. They'll have one of the guys eventually translate the algorithms into their native language.
Interestingly, I really do wonder how often do cases such as these occur, where one guy is able to do a good job that the other guys that follow after can't keep up. I best that this is how a lot of people start their contracting gigs.
Thursday, October 06, 2011
Steve Jobs has Passed
Some links to postings about Steve Jobs from notable people:
Outpouring from the internet is simply massive right now.
Is a crash on the way?
Of an interesting note, the venture business in the US could be looking to take a hit in the slowing economy and this is something that I'd like to keep an eye on.
As for now, the yen is sky rocketing like crazy. What that means to me is that I'll be looking in ways of putting in more over time to make more cash and sell yen for other currencies because I think the yen is over values.
Monday, October 03, 2011
From Kagoshima to Tokyo and back again
I eventually made it back to my apartment and found that I had left a light bulb on for the entire 2 months. An interesting experience but when I did power calculation, having that light bulb on for 24/7 over a month it cost about $24. It's pretty amazing how much power a light bulb draws over the course of a month, more than the fridge I have.
But to be honest, most people don't have their lights running at home for 24/7. Interesting lesson.
The mail box at home was stuffed to the brim with fliers for all sorts of things, especially girly stuff like manicures, hair salons and frilly clothing- nothing that a man would need. Sexist marketing at it's finest? Quite possibly so.
I also dropped by the office today and saw one of my old managers and his greeting to me was:
Manager: "Welcome back. You look thinner. You okay? Maybe you should see a doctor"
Apparently I have a rather interesting work place.
I got back and picked up a $800 LCD monitor and had it shipped off to Kagoshima for me to use for programming. I even had it shipped by air. One of those perks about working in a large corporation.
Friday, September 30, 2011
Applied Stock Market Stochastics 2 (applications to options)
Understanding options is a little math heavy; option pricing comes from the black-scholes equation pricing equation by assuming that the price of an equity moves in a Geometric Brownian motion like way with a constant drift and volatility. We can model this using the mean and standard deviation by throwing the parameters into a Gaussian function. The black-scholes equation is basically a closed form solution to the differential equation representing this condition.
I got tired of simply just looking at the equation so I decided that it would be more interesting to create a statistical model to determine the motion of the price of a stock. In my last post in Applied Stock Market Stochastics, I analyzed the historical prices of the Dow Jones index as a distribution of percentage change on a month by month basis. The result showed that the motion of the stock market moves around in a Gaussian like manner.
I will assume that you have a basic understanding of put and call options. If you don't know about them, the short story is that the purchase of one of these contracts is a bet that the price of some equity will be above or below some price. If it is above or below that price, your profit is proportional to that difference (and if you need to learn more, hit the links or Google for more details).
With that in mind, the question that I want to solve is the likelyhood of making a profit or loss and by how much. If we understand the probabilities of making a profit or loss we can then calculate for the "expected value" of the trade-- which is the average loss or profit that we expect to get if we made the same bet over and over again. If the expected value is positive, we expect to make money and vice versa.
Now, I am not aiming for the level of sophisticated analysis hedge funds do out there and I won't pretend that I know that much either, but I do have a great fascination of learning about things though a first principles approach; and I think this is a great first principles approach to tackling this problem!
So let's first model the motion of an equity instead of a stock market index. In this case, I've downloaded Google's historical prices for the last 3 months (between June and September) and calculated the mean and standard deviation of it's % chance in price on a daily basis. The numbers I got from this calculation were 0.0373% and 2.409 for the mean and standard deviation in percents. For actual use in the models, I divided these numbers by 100 and ran a simulation using 100,000 simulations to simulate the resulting price of the Google stock by October 20, 2011 which is the expiry date for a set of call and put options. The resulting plot looks like the one below:
The change factor is the multiplier which you would multiply the stock price to determine it's final value. The plot here, is also normalized (meaning calculating the area of this graph will equal 1 or 100%).
Now for illustrative purposes, I took an option at random, which was the $555 strike call option dated for Oct 20th 2011, which was priced at about $12.00 when I checked at Google Finance and plotted out the returns as a function of price:
![]() | ||
| $555 strike, call option Profit/Loss profile @ a price of $12.00 |
What this graph tells us is what you expect to earn/lose over all the possible outcomes. Summing the values together will yield the expected value of this trade, or the amount of money you expect to make when making this bet over and over again. I've done that calculation and the number resulted in -$3.023/per share (and 1 contract is a multiple of 100 shares) meaning that you expect to lose $302.3 on average when making this trade.
But!! There is an upside to this however, in that you can instead sell a call contract instead of buying one and expect to make $302.3 instead and turning this into a profit.
Caveats
Obviously, if this were the case then everyone would already be doing this to make money in the stock market (and to some extent, there are people and organizations out there that are already doing this). So there are 2 important assumptions that you needs to be aware of, and those are:
- that the motion of price can be modeled by a random Gaussian variable and
- the mean and standard deviations are accurate and do not change
So what is this good for?
This is a problem that plagues historical analysis when trying to make predictions of the future. But the most important take away from this is developing an understanding of the likely and unlikely future outcomes to help in making better decisions; in the long run, this is the most important part.
Now, even with these points of uncertainty, this could be used as a model outcomes based on your research and how you feel about it. The great power bestowed from this is being able to quantify your opinions of the future and risks involved by turning them into an expected value. This helps considerably in decision making instead of simply just going off on "a hunch."
There is obviously more work in modeling random variables and outcomes but I hope that you find this a useful tool in thinking about the future movement of a stock. Ideas and comments are most welcome.
Thursday, September 29, 2011
Load Speeds are Important
I have been toying with getting onto Amazon AWS and setting up my own server and having my own space. The great thing is that I would have some persistent computing power available to me to run some automated applications. I really think that there are many fun things that one can do with having a server, without having the need to own the hardware to do things.
I am somewhat reluctant at using my main computing box at home as a server since I want something that I could completely crash with impunity but I am not really that interested in having a second full blown desktop computer at home. One option that I've been contemplating is using a MacMini as a server due to its really small foot print, the price is reasonable too at about $700 for a system with 4GB of memory.
Interestingly the same system sells for about $100 more when buying through the Japanese Mac Store. I think the exchange rate is playing with the price significantly as the Yen has sky rocketed (time for the arbitration??).
Time to do some research, but with some effort, it is possible to setup a server on AWS for about $110/year and have some fairly decent speeds. Storage goes for about $0.10/month meaning that I could have 4-5 Gigs of website data easily and still be only paying about $0.50/month in storage. Seems really reasonable to me.
All I would need to test is latency and bandwidth. If things look good, I'll probably make the switch.
Wednesday, September 28, 2011
Distractions are Productivity Killers
In an environment like that, memory and concentration intensive work is nearly impossible. To be honest, some of the best progress I've made with code was done while working the night shifts where no one was around and I was able to just zone out and simply focus on what was going on with the code. While programming, I really need to be able to keep track of variable names, the structure of the program and algorithms in my head. The instant my concentration is broken, it takes time to reorient myself to figure out what I was doing again. This is actually a classic coding problem, especially when looking at code that one wrote days earlier.
To me I am not a huge fan of large open offices. There are some people out there that are able to focus in such environments, however, I am just not one of those people. I'd much rather have headphones on and be dead to the world while getting work done.
I am quite sure that offices around the world are setup in some manner like this, but I think it is rather counter productive. With laptops being used a primary computing devices, I really don't mind having a main desk somewhere, but I'd be much happier to have access to a silent stall where I can allocate blocks of 2-3 hours to get some serious work done and return to my desk to get less mentally intensive work done and be accessible to people. I am sure that there has been plenty of research done in this field and I am curious at how much of this research is implemented in offices around the world.
I would venture to bet that an architect that is able to create highly productive environments would be paid big bucks!
Tuesday, September 27, 2011
All You Need is the Right Trigger to End Microsoft
The greatest benefits to me about using a Linux system is the ease of reinstalling software and getting original settings back after a fresh install. I still remember times when working on a Windows computer where I would reinstall the OS once or twice a year to freshen things up and spend 2~3 days getting the system back up again with all the software that I use and configuring everything to my liking. What a pain that was.
The difference with working on Linux and having a home directory where all one's settings are stored in (somewhat) hidden folders, is that as soon as program is reinstalled, the home folder is the first place the program looks for to get the setting information. So long as you backed up the home directory, the instant you reinstall software, it is automatically configured. The other great thing is that software can be batch installed from repositories, and instead of having to deal with installation dialogues, you just tell the computer to install the software and it automatically installs them to a binaries folder and things are automatically setup. If you have multiple users, everyone's home directory holds each user's personal settings so there is no clashing whatsoever. Everything is simple to install and fast to restore.
The other great thing is having free software and having a repository to download whatever you need from. Just download the software, give it a try and if it works great then keep it. If not then uninstall it and try something else and most free software out there is "good enough" for all practical purposes.
There have been times that using free software didn't work out for me because of some minor formatting or incompatibility issues. For example, while open office can open and read MS Office files, there are times when the formatting of documents get a little off. I had the unfortunate problem of trying to write and update resumes in open office to find that the alignment of text was just off enough to make the document look a little unprofessional. As a result of that, I've become a little bit of a fan of PDFs, once you convert the document into a PDF, it should display the same across all systems.
If worse comes to worse, with the advent of OS virtualization, I am now able to run Windows inside of Linux or Linux inside Windows or what have you. I think this is a great boon to trying out new OSes and also getting access to just that one application that you can't find on your native OS. Rebooting is such a pain as I generally don't like needing to close all my applications and then open them all again after restarting the computer. Right now I use Win XP in side of Ubuntu just for MS Office on the rare occasions to edit documents, but other then that I don't use Windows for much else while at home.
To be honest, I don't see any real argument for the need to be dependent on a single operating system anymore. Most of the best software are multi-platform now and using them is just a matter of installing them onto whatever OS that you're on. Even writing multi-platform applications is not terribly hard using languages like Java or even Python since just-in-time compiling is sufficient to create native code for the applications to run.
So there really is no real need to be totally dependent on a single operating system anymore for any reason other than for the comfort of a familiar interface. To be honest, I think that Microsoft is walking on hollow ground; the instant the ground gives, I think it will be all over for them.
Monday, September 26, 2011
Is Facebook killing blogs?
I've tried blogging while on the go (on places like the train) but found that doing things like looking up multiple webpages, adding links and doing basic editing (like moving a few paragraphs around) to be quite cumbersome compared to writing short status updates.
Which brings me to the point that I believe that traditional blogs are dying out compared to posing things on the fly as smart phones become the norm. The vast majority of my friends have since stopped updating their blogs and mainly post news only on Facebook, which has been the trend for quite some time.
What will happen to blogs in the future, I am not entirely sure. Perhaps one day there might be a big enough backlash against Facebook that people may return to realm of blogging. Who really knows. I for one will continue to write, and actually make a point of spending more time posting to the blog compared to writing on Facebook. Perhaps the next best thing is stronger integration into (out of?) Facebook through blogs.
To be honest, there isn't a whole lot of original content on Facebook anyways and much of my best thinking happens while doing "real" writing.


