Tuesday, June 26, 2012

1% Up and 1% Down ≠ 0% Cumulative Effect

Suppose the indices are up 1% one day, and down 1% the next. Is the cumulative effect 0%? What if they were down 1% and then up 1%? It turns out that in both cases, the cumulative effect is not 0%, but rather negative. To understand this in the most simple manner, realize that 1% of 1.01 (after 1% gain) is more than 1% of 0.99 (after 1% loss). Therefore, the 1% loss is greater than 1% gain. And due to the communicative property of multiplication, it doesn't matter whether up or down occurred first.

The cumulative effect is 1.01*0.99 = 0.9999, not 1. To truly offset an 1% loss, the gain required would only be 1/0.99-1 = 1.010101%, which is above 1%. This residual decreases as the magnitude of the gain and loss becomes smaller. Let x be the same magnitude for the gain and loss, so x=0.01 in the case above: (1+x)*(1-x) = 1-x^2. Compared to the unchanged initiate value of 1, the difference is simply x^2. So when the gain and loss is 10%, the end result is 1% lower. When the gain and loss are 1%, or 0.01, as was the case above, the end result is 0.0001 deviated, and the cumulative effect of 1.01*0.99 = 0.9999 confirms that.

While 0.9999 may not seem much different from 1, the effects can easily add up. Supposed that the portfolio repeatedly bounced up and down 1% each day for the entire calendar year. Given 250 trading days, so 125 of such cycles, an $100 portfolio will only be worth $100*0.9999^125 = $98.76 after the year, corresponding to 1.24% loss. And because the magnitude-residual relationship is quadratic as observed above, the effects multiply quickly: given 2% back-and-forth for a year, the same $100 portfolio would only be worth $100*0.9996^125 = $95.12, or 4.88% loss.

Monday, June 25, 2012

MATLAB Code for 1-D Random Walk

See related post: 1-D Random Walk with Equal Probability

The previous post ran a simulation of one-dimensional random walk. Here is the MATLAB code that was run to achieve the the results, along with explanatory documentation:
numRuns = 100000;       %# of resets to position 0
numTrials = 1000000;    %# of trials per run
probLeft = 0.5;         %Here, equal probability going to left and right
zero = 0;               %# of times on position 0
negative = zeros(1);    %Array to keep track of # of times on negative numbers
positive = zeros(1);    %Similar array for positive numbers
for run = 1:numRuns     %Loop over the # of runs
    position = 0;       %Reset position for each run
    for count = 1:numTrials     %Loop iver the # of trials
        roll = rand;            %Simulated roll
        if roll < probLeft      %Going to the left
            position = position - 1;
        else                    %Going to the right
            position = position + 1;
        end
        if position < 0
            if abs(position) > length(negative) %If the position has never been visited before
                negative(abs(position)) = 0;    %Initialize the value to avoid error
            end
                negative(abs(position)) = negative(abs(position)) + 1;  %Increase counter
        elseif position > 0
            if position > length(positive)      %Similar tasks as above, but for positive positions
                positive(position) = 0;
            end
                positive(position) = positive(position) + 1;
        else
            zero = zero + 1;        %If landed on zero
        end
    end
end
y = [negative(end:-1:1) zero positive]; %# of times landed on each position
x = -length(negative):length(positive); %Position vector
plot(x,y)
xlabel('Position')
ylabel('Number of Times on the Position')
title('1 Dimensional Random Walk')

In this code, the variable 'probLeft' had a constant value of 0.5, reflecting on equal probability of going to the left and right. Further adjustments can tweak to define this variable to allow for the probability to reflect on the current position.

Friday, June 22, 2012

1-D Random Walk with Equal Probability

This is the absolutely fundamental case of random walk. Start from position 0 on an one-dimensional number line. One unit step is taken on each step, with equal probability of going to the left and the right. The number of times stopped on each position is kept track. What's the distribution like after many steps?

It turns out that because the probability of moving in either direction is independent of the current position, increasing the number of steps in each trial doesn't help to reduce much variance. Instead, "resetting" the trials back to position 0, while keeping and continuing the tracking, helps to yield a smoother distribution curve. For this exercise, 100,000 runs were simulated, each with 1 million steps. In another word, 1 million steps were simulated, the position reset to 0, another 1 million steps simulated, the position reset to 0, and so forth until 100,000 of such cycles were completed. Overall, that's 100 billion steps. Here was the result:

Upon extraction of variable values, the following useful data were attained:
  • Most extreme positive value landed on: 4,729
  • Most extreme negative value landed on: 4,900
  • Number of times landed on position 0: 79,820,608
  • Percentage of time position was between [-100, 100]: 15.07%
  • Percentage of time position was between [-500, 500]: 58.15%
  • Percentage of time position was between [-1000, 1000]: 85.00%
  • Percentage of time position was between [-2000, 2000]: 98.85%

Tuesday, June 12, 2012

Kings of 8th Seed Champion

See related post: 3-0 Playoff Series Comebacks in Professional Sports

On Monday, the Los Angeles Kings of National Hockey League defeated the New Jersey Devil to win the Stanley Cup, the first time that an 8th seeded team has won the championship in either NHL or NBA, the two leagues that employ the 16-team playoff format. The Kings have been the story throughout this playoff. Despite barely making the playoffs, the 8th seed Kings went onto defeat the Vancouver Canucks, St. Louis Blues, and Phoenix Coyotes, the 1st, 2nd, and 3rd seeded Western Conference teams, respectively, on its way to the Stanley Cup, where it defeated the Devils in 6 games for its first Stanley Cup trophy ever.

In NBA, only give 8th seeded teams have won the first round of the playoffs, most recently the Philadelphia Sixers this season against the Bulls. In the most successful case, the 1999 New York Knicks managed to make it to the NBA Finals, where it ultimately fell to the Spurs. Over at NHL, there have been more cases of upsets. In the most successful case, the 2006 Edmonton Oilers managed to not only make it to the Stanley Cup Finals, but also managed to come within 1 game of winning it, before losing to the Hurricanes in Game 7.

Not only did Kings it all, they won their series in decisive fashions. Until Game 5 loss at New Jersey, the Kings had won every single road game (10-0) of the playoffs. The ten road roads tie a single postseason NHL record. Given that the 8th seeded Kings began all series on the road, they were able to take commanding leads in all series. In fact, they were also able to win all Game 3's at home, thereby beginning each series up 3-0. Only a handful of teams have come back from 0-3 hole. The Kings put all four of their opponents in that unbearable hole, before finishing the series in Game 4 (vs Blues), Game 5 (vs Canucks and Coyotes), and Game 6 (vs Devils). The 16-4 run to championship was quite an impressive one, and the Kings doing so with an 8th feed makes it quite unique.

Sources:

Monday, June 11, 2012

Micronetics Inc (NASDAQ: NOIZ) Merger with Mercury Computer Systems Inc (NASDAQ: MRCY)

On an overall dismal day for the markets Monday, as all three major US indexes fell over 1%, jumping a whopping 94.79% was Micronetics Inc. (NASDAQ: NOIZ). Headquartered at Hudson, NH, Micronetics "designs and manufactures high quality, reliable, microwave/RF components, multi-function subassemblies and highly integrated subsystems," according to its website. Over the weekend, it was acquired by Mercury Computer Systems, Inc (NASDAQ: MRCY) via a merger for $14.80 per share. Shares of Micronetics, which closed 7.49 last Friday, jumped to close at 14.59 on Monday.

Financials reveal that in the 12-month period ending in Q1-2012, the revenue and profit of Micronetics were at $45.97 and $3.41 million, up from $35.30 million and $1.52 million, respectively, the previous 12-month period. Shares of Micronetics have not been as high as the acquisition price of 14.80 since July of 2006. According to its website, Mercury, headquartered at Chelmsford, MA with market cap of over $360 million, is the "leading supplier of very high-performance digital image, signal and sensor processing solutions for prime contractor customers in the defense industry, as well as the Intelligence Community."

Sources:

Maximum Possible "Jeopardy" Score and its Probability

What's the theoretical maximum score on the TV show Jeopardy? To get the maximum possible score, one has to ring first on all answers (or have a different first ringer answer incorrectly), answer everything correctly, bet the maximum amount on all occasions, and then a luck factor plays in. The Daily Double clues are located at the optimal spot. If all of the non-luck factors are obtained, what's the probability that yields all of the lucks in place to obtain the theoretical maximum score?

In the first round, there are 6 categories, with each with $200, $400, $600, $800, and $1000 clues. Add them up and multiply it by six: 6*(600*5) = 18,000. However, there is one Daily Double clue in this first round. Since the Daily Double clue annuls the monetary value originally associated with the clue, the Daily Double has to be hidden behind a $200 clue to minimize the annulling, and thus maximizing the overall score. Subtract 200 from 18,000 leaves 17,800. If everything is wagered on Daily Double and the answer is correct, that leaves 17,800*2 = $35,600 just from the first round.

In the Double Jeopardy round, everything is doubled: 6 categories, each with $400, $800, $1200, $1600, $2000. Furthermore, there are two Daily Doubles. Start with the $18,000 figure calculated from the previous round. Double that, since it's Double Jeopardy: 18,000*2 = 36,000. Now, we need to backtrack two of the $400 values to account for the Daily Double. That leaves 36,000 - 2*400 = $35,200 gained purely from Double Jeopardy, without the Daily Doubles. Don't forget to add the amount from first round, and that leaves 35,600 + 35,200 = $70,800. Now for the two Daily Doubles, as well as the Final Jeopardy, everything is wagered and answer correctly. That is 3 times of doubling the score: 70,800*2^3 = 70,800*8 = $566,400.

Now the question is, if suppose someone can ring first on all answers, answer everything correctly, and still bet the maximum amount on all occasions, what's the probability that the Daily Doubles will be located in the correct spot to allow this theoretical maximum score? Well, in the first round, it has to be hidden in one of the $200 clues. That's a 1/5 chance of that happening. Independently from that, the chance of the two Daily Doubles both hidden under $400 in Double Jeopardy is (6/30)*(5/29). The first one can be in any of the six $400 slots, out of the 30 overall clues. After that's taken care of, the second one has to be in any of the five remaining $400 slots, out of the 29 overall remaining clues. Therefore, the overall probability is (1/5)*(6/30)*(5/29) = 0.00689655172, which is exactly 1/145.

So overall, if someone can ring first on all answers, answer everything correctly, still bet the maximum amount on all occasions, and has the 1/145 luck chance, it is possible to get the theoretically maximum score of $566,400 on Jeopardy. To give a comparison, that value is over 1/5 of the amount Ken Jennings earned during his record-setting 74-win streak.

Sources:

Saturday, June 9, 2012

I-490 Extension Debate in Cleveland

Anyone who lives in the southeastern suburbs of Cleveland driving to Case Western Reserve University or Cleveland Clinic knows this dilemma: there just isn't an effective highway route that connects University Circle to the suburbs. Even for those who don't directly work there, it's an important issue: Cleveland Clinic alone is one of the biggest employers in Northeast Ohio. The following map illustrates the issue:


The closest highway interchange is northward at I-90 and MLK Drive. While this actually is a pretty effective route for commuters coming from the northeastern (via I-90 westbound) and western (via I-90 eastbound) directions, it is not an efficient route for people coming from the southeastern direction. Taking I-271 northbound and transferring to I-90 westbound is an enormous detour. Taking I-480 westbound and transferring to I-77 northbound is still quite a detour. Instead, most commuters know to get off I-271 at Chagrin Blvd and drive another 20+ minutes on the local roads. Another option, getting off I-480 at Broadway, takes a bit less time, but most suburban commuters avoid it due to the long stretch of local roads in the Cleveland city proper. Either way, as shown on the map, there's the enormous area enclosed by I-77, I-271, I-480, and I-90 that lacks a highway.

Try to spot I-490. It's only 2+ miles, running west-east slightly south of downtown. It connects onto I-71 and I-90 on its western terminus, but ends abruptly at East 55th St at a grade crossing. Looking at the map, if I-490 continued eastward, it could easily connect University Circle and join I-271 to the north. That would be the ideal route for commuters coming from Beachwood, Gates Mills, or anything southeast of that, which covers notable communities like Orange, Solon, and Twinsburg. It's quite a portion of the Great Cleveland commuters. Alas, no such highway system exists. However, the idea of it has floated around before.

In fact, in the early 1960s, there was a proposal to construct the Clark Freeway that runs east-west through Shaker Heights and connect onto I-271. However immediately, criticism came in about the elimination of  homes and commercial properties that would result. In fact, this reaction was hardly confined to Cleveland. During the 60s and 70s, freeway and expressway revolts spread throughout the nation, as potentially affected neighborhoods voiced their concern of disruption. The unpopularity eventually resulted in the scrap of the proposed Clark Freeway. Instead, the Clark Freeway (I-490) merely stretched for 2+ miles it encompasses today.

Recently there has been rejuvenated efforts to stretch I-490 at its eastern terminus to University Circle, denoted the Opportunity Corridor. While there would be no eastern connection to I-271 and thus would not be the panacea for southeastern commuters, it would bring some relief to all. However, there first is the budget issue. With ODOT putting numerous projects on hold, the fiscal responsibility of the $200+ million project demands an answer. Furthermore, locals living in the path of the route would still be displaced. The area between University Circle and I-490 terminus is quite an economically lackluster region, and leaders hope that an infrastructure upgrade would also stir commerce in the region.

If Great Cleveland can learn something about infrastructure renovation, the recently completed Euclid Corridor has been quite a success. The $200 million development of rapid-bus route and transformation of Euclid Avenue, connecting Downtown Cleveland and East Cleveland while passing University Circle and Cleveland Clinic, has attributed to several billion dollars of new development. One can only hope that the Opportunity Corridor would one day bring similar results. University Circle would also be more easily accessible from highway, the airport, and commuters. Yet despite such, for the commuters coming from the southeastern direction, it doesn't look like they'll get their wish of connection from I-271. Those disgruntled can attribute the demise of a direct connection route to the nationwide phenomenon of freeway protests that rocked the country in the 1960s. That affected area is still heavily populated, and unlike the area affected by Opportunity Corridor that could benefit from revitalization,would likely still face great friction in pushing through any idea of freeway.

Sources:

Wednesday, June 6, 2012

Tempur-Pedic International Inc (NYSE: TPX)

It doesn't look like memory foams will not cushion this latest news for Tempur-Pedic (NYSE: TPX). Shares of the company tumbled over 48% on Wednesday, after it was announced that second-quarter profits will drop 50% from last year. Analysts had expected 86 cents per sharing of net income, but the expectation is now only 34 cents. Much of this is due to increased competition from mattress makers. An analyst from Gilford Securities is quoted in saying that Tempur-Pedic "needs to institute a strategy where they drive more brand loyalty, not only from consumers but also retailers."

The history of Tempur-Pedic goes back to the 1970s and NASA, which was "[developing] pressure-absorbing material to help cushion and support astronauts during lift-off." In 1992, the company was formed in Lexington, Kentucky, where it is headquartered now. From 2008 to 2011, profit had climbed over 270% from $58 million to $219 million. However, as CEO Mark Sarvary claims, the environment in North America has seen "unprecedented number of new competitive product introductions which have been supported by aggressive marketing and promotion." Notably competition has come from Sealy Corporation (NYSE: ZZ) and Select Comfort (NASDAQ: SCSS), which also saw losses of over 5% and 20% on Wednesday, respectively.

Sources:

Tuesday, June 5, 2012

Westport Innovations Inc (NASDAQ: WPRT, TSE: WPT)

On Tuesday, the stocks of Westport Innovations (NASDAQ: WPRT, TSE: WPT) climbed over 21% at NASDAQ to close at 27.02. Based in Vancouver, Westport trades not only on the NASDAQ but also on the Toronto-based TSE. According to its website, Westport "is a global leader in alternative fuel, low-emissions technologies that allow engines to operate on clean-burning fuels." Income statements show that Westport has had negative operating income in not only each of the past 5 quarters, but also annually for each of the past 3 years. Profit margin was Q1-2012 was -20% as the company lost $22.63 million USD.

The stocks climbed Tuesday after a deal was announced between Westport, which has market capitalization of slightly above $1 billion and Caterpillar (NYSE: CAT), which has market cap of over $54 billion. The would focus on "[developing] fuel systems for off-road vehicles," including natural gas engines in locomotives. The incentive to focus on natural gas comes from the substantial price difference between natural gas and diesel fuel, which results in "strong financial incentive to enable off-road applications to take advantage of low ... costs without sacrificing operational performance." Shares of Caterpillar climbed a meager 0.47% for the day.

Sources:

Thursday, May 24, 2012

Evaluating Methods of Communication: Rules of Phone Calls?

A conversation with a friend led to the question of "are there rules for when one can call someone?" Of course there are not, unless we are dealing with restrictive orders. But in today's living, where the modes of communication range from making phone calls, sending text messages, leaving Facebook posts, to sending instant-messages, is there a respectable convention?

No matter how technology progresses, the modes of communication can be categorized on a spectrum of attention-seeking. Off at the highest end is calling on the phone or video-calling on Skype; it's hard to multi-task while doing that. Off to the other end of the spectrum are methods like sending emails (suppose the recipient checks email consistently), leaving Facebook posts, or even sending text messages. For these, at the moment the information is passed on, the recipient can choose whether or not to put his or her attention onto it. He or she also chooses to reply at a moment of convenience. In-between is sending instant-messages. While the recipient can choose to pay attention and response at his or her discretion, there is a modest amount of attention beheld, for a response is expected soon; otherwise, it turns into relaying messages back-and-forth.

The most crucial component of a piece of information that dictates its communication method is its urgency. If it's an urgent information, it justifies seeking the immediate attention of the other. Here's an illustration. Suppose you're meeting a friend at 12:00. If you realize at that day 11:50 that you can't make it today, the best bet is to call, lest the friend is already on his or her way. This is an urgent message, and that justifies seeking the attention of the friend, regardless what the friend was doing at the time. Now suppose it's one week before the scheduled meeting, and it needs to be rescheduled. All of the forms of communication are acceptable, but methods toward the bottom of the attention-seeking spectrum are most appropriate. These non-attention-seeking methods will be able to convey the necessary information in time to serve its purpose (to schedule a new meeting time in the upcoming week).

Of course, there is nothing inherently "wrong" with calling the friend one week in advance purely to say that the meeting needs to be canceled. Instead, it's a probabilistic inconvenience. Go back to the moment one week before the scheduled meeting. The friend may be idle at the moment you call, in which case there's no real detraction from calling. However, what if the friend is really busy at the time, such that taking the non-urgent call disturbs his or her actions? Let's use the concept of utility, and specifically, the mutual utility of having the information successfully communicated, and the change in personal utility from picking up this information in the particular method. In the disturbed case, the friend's personal utility decreased due to the disturbance, but no mutual utility is gained from having the information successfully conveyed instantly. This wouldn't be true in an urgent situation, where if the information isn't successfully conveyed within time, the mutual utility plummets. Back to the case though, there can be no gain from using the attention-seeking communication method, given that the probability of non-attention-seeking methods getting the information across successfully is almost certain. Instead, regardless of what the probability that the friend is super busy at the time, the total change in combined utility will be non-positive. It could be unchanged, but it can decrease; by no way will it increase.

That's why making a non-urgent phone or video call is inefficient for both parties. If the information to-be-conveyed truly is not urgent, there are no benefits from utilizing the attention-seeking method of communication. Of course, some can argue for the increased heartfelt happiness as a result of those more intimate communication methods. Well, here we are assuming that there are no such effects. Amorous environments are of another realm, because when one tries to quantify love, well, we lose quantifiable results.