Friday, April 30, 2010

old age and obfuscational dialogue

When I was younger, I got angry confused mildly irritated* when I read statements like:

2/3 of stock returns lie within one standard deviation of the mean
and
stock returns have a normal distribution.

Now, much older and (perhaps) wiser, they don't bother me any more.

However, it's still disturbing to note that financial gurus like to change the meaning of words (or attach misleading meanings).

For example, the word risk which the Common Joe would understand to mean:

risk n The possibility of suffering harm or loss.

In financial circles, this guy was assumed to mean the Standard Deviation of a set of stock returns.

Now, to calculate the Standard Deviation of set of n (historical) returns, Rj, the magic formula is:

Standard Deviation
= SquareRoot[(1/n) { (R1-M)2+(R2-M)2+...+(Rn-M)2} ]


where M is the Mean of the returns.

As anybuddy can plainly see, this animal is a measure of the deviation of returns from their Mean.

So why would anyone call it the risk associated with this stock?
If my returns were 10% larger than yours, we'd have the same risk.
That's because the SD doesn't change when you add a constant to the set of numbers.

If we both invested in a guaranteed returns certificate, but my guaranteed returns were twice yours, my investment would be twice as risky.
That's because the SD doubles when you double all the numbers.


Okay, so many (recognizing that "risk" is perhaps a misnomer), began to call it the uncertainty associated with stock returns.

Huh? Where's the uncertainty here?
(The first set of returns has higher SD.)

Why can't we just call SD the Root-Mean-Squared (RMS) deviation of returns from their Mean? **

Anyway, we now have a plethora of risk measures, like downside risk, value at risk, drawdown risk, omega ... ad nauseam.

*In the last century, there was this discussion on obfuscational dialogue.
** We (perhaps unknowingly) use RMS all the time. For example, the RMS voltage that comes rushing from out electrical outlets is 120 volts RMS. The actual voltage ranges between +/- 170 volts.

------------------------------

As evidence that I'm gettin' old, I ran across the quiz I have on my web site ... and couldn't answer any of the questions ('cept 5.2)
------------------------------

Once upon a time I thought I'd like to define the sex appeal of a stock as its Standard Deviation. That way, my investing in very volatile stocks (as I do) would make me feel warm all over.

 

Thursday, April 29, 2010

Illegal aliens


Some interesting numbers, questions, problems one finds while googling ... pertaining to the U.S.A.
[1] According to the World Bank, 53% of Mexico's population of 104 million residents live in poverty.
[2] Unemployment in Mexico: 40%.
[3] Unemployment benefits in Mexico: 0.
[4] Annual monies paid by illegal workers (and their employers) to U.S. Social Secuirty coffers: $7B.
[5] Number of illegal workers who will collect Social Security benefits: 0.
[6] In 1999, under President Bill Clinton, the US government collected $3.69 million in fines from 890 companies for employing undocumented workers.
[7] In 2004, the Bush Administration levied NO fines for US companies employing undocumented workers.
[8] Is the presence of illegal workers profitable to companies and government? Yes.
[9] Are members of congress eager to curry favour with Hispanics? Yes.
[10] Will the U.S. federal government take extraordinary measures to eliminate illegal workers? No.

Comment by Pastor Robin Hoover (of Humane Borders):
The U.S. has two signs at its Southern border
Help Wanted: Inquire Within
and
Do Not Trespass

----------------------------------

On the other hand, education, health care and incarceration of illegal aliensthe costs Californians $10.5 billion per year.
----------------------------------
I just read the new/controversial Arizona law:
sb1070s.pdf
 

Wednesday, April 28, 2010

Normalized Stock Prices

I got e-mail asking about normalized stock prices.
Alas, I never heard of such an animal. **
So I google and find a jillion definitions of "normalized" (when it comes to stock prices).
However, it was intended to identify pairs of stocks whose prices tend to move together.
Then, if they diverge (A goes UP while B goes DOWN), we expect them to converge to historical relationships ... so we sell A and buy B.

So then I find this reference where, by normalized, they mean:
(Price - Mean) / (Standard Deviation)

So we (presumably)
  • Collect a bunch of (historical) prices for stocks A and B.
  • Calculate the Mean and Standard Deviation of each set.
  • Replace each price (in each set) by the its corresponding normalized price.
  • Stand back and stare at the pair of normalized prices ... and make some decision.

I'm not convinced it'll do much good, but (as is my wont) I generate a spreadsheet to see what I can see. It looks like this:
(Click on picture to enlarge)
Okay, so I stare and stare ...

Wanna play? Click here to download the spreadsheet.


** Ron McEwan writes and tells me that Excel does this ... but they call it "standardized" rather than "normalized".

 

Monday, April 26, 2010

Ralph Stanton

In 1953, in a first year math class, I had an interesting prof.
His name was Ralph Stanton.

Four years later, when I graduated in 1957, I and a couple of my classmates were invited to teach math at what was known as the "Associate Faculties" of Waterloo Lutheran College, in Waterloo, Ontario.
Sure, why not? Sounded like fun.

This college did not have a charter to grant degrees.
I had to drive to London, Ontario, to have my final exams approved by the math chairman at Western University.

However, there were some, including Ralph (who was head of math at the College), who had great plans:
Build a brand new university just up the street.


Although there were various objections, a number of acres were purchased and (eventually) the University of Waterloo was born.
It had an innovative Coop Education program.
It is now the largest such program in the world.

The old college also became a full-fledged university:
Waterloo Lutheran University ... and then (eventually) Wilfred Laurier University, retaining the initials WLU.

I taught at U of W for a couple of years and watched with awe as the new university grew.
Then (when Heidi had graduated from nurses college), we went to the University of Illinois so I could get a PhD (and Heidi a PhT: Putting Hubby Through).

Although my thesis supervisor had arranged a job at Bell labs, Ralph visited us in Illinois and convinced us to return to Waterloo ... which we did.

How the university had changed!
(Years later, I wrote a short history of Computer Science at Waterloo. It included Ralph's contribution ... but I can't find a copy.)**

During the next first few years I watched Ralph at work.
Again, in spite of various objections, he managed to convince the powers-that-be to create North America's first Faculty of Mathematics.

There were six departments in this new Faculty and Ralph selected me as the first chairman of the Applied Math dept.
(Students in the Faculty, competing in the annual Putnam Math Competition, have ranked sixth in North America, after Harvard, MIT, Caltech, Princeton and Toronto and ahead of Berkeley, Cornell, Stanford, Duke, Chicago, Yale and Columbia. Not bad for a young university, eh? I coached the Putnam Team for a few years. I must have been a lousy coach 'cause, with my input, we never did better than 7th.)

Soon after, Ralph left for the University of Manitoba.
However, his notorious (gawdy?) pink ties are still remembered. Indeed, the pink tie is the icon for the Faculty and hangs with pride on the math building on special occasions:


A few days ago, Ralph Stanton died.

**
Don Cowan (the first charman of Computer Science)
kindly sent me a copy of my lost "history"


The preamble to the History of Computer Science
(based upon stories told to me by Ralph Stanton)


In the beginning ...

It was 4:27 p.m. The meeting of the board of governors had but one item on the agenda: the recommendation of the Academic Advisory Committee (AAC). Ralph Stanton leaned back, gazed at the clock, then at Ted Batke; both looked weary. Carl Pollock was speaking in favour of the recommendation, but there seemed little hope of other support from the board.

Little more than a year had passed since Ralph left the University of Toronto to chair the mathematics department at Waterloo College, a small liberal arts college sponsored by the Lutheran Church and granting degrees through an affiliation with the chartered University of Western Ontario. For members of the math department at the College it meant the curious, annual ritual of driving to London, Ontario, to have final examination papers approved by the math Chairman at Western.

But there was something else: co-operative education, a first in Canada. It was a novel scheme championed by Joseph Gerald "Gerry" Hagey, late of the B. F. Goodrich Company and current President of Waterloo College, and Ira G. Needles, president of B. F. Goodrich and chairman of the board of governors.

Classes had begun in July, 1957, with some seventy-five students who had completed Ontario grade 12 and enrolled in a "pre-engineering" program on the small campus, alternating 3 month academic terms with 3 month work terms. They constituted the Associate Faculties of Waterloo College. The church-affiliated College now had a non-denominational component (a Faculty of Applied Science, with Les Emery as Principal) which could attract provincial funding not available to sectarian institutions.

In 1957, classrooms for the Associate Faculties were located in two prefab huts, Annex 1 and Annex 2, providing some 8,000 sq. ft. of teaching space behind Willison Hall, the only permanent structure on campus besides the Arts building. Ralph Stanton had hired four graduates from the Engineering Physics program at the University of Toronto: Dave Fisher, Jim Leslie (now in Physics at UW), Keith Oddson and Peter Ponzo. In 1958, A. S. "Bert" Barber succeeded George Dufault as director of coordination, handling job procurement and sharing space with the fledgling math department in a house at the Albert and Dearborn corner of campus.

But, in the fall of 1957, the recommendation of the Academic Advisory Committee (AAC) constituted a necessary preamble to the creation of a new university - and support was minimal.

Ralph Stanton brushed the hair from his forehead, leaned on the table with chin in hands and listened to the debate. It was 4:42 and the meeting was to end at 5:00. p.m. A.M. Snyder, a local businessman and member of the board, had spoken vehemently against the recommendation. Now Carl Pollock was speaking, again. A native of Kitchener and president of Electrohome Canada Ltd., his support was needed, and appreciated, yet his seemed the only supportive voice. Gerald Hagey had been strangely quiet. Ira Needles, as chairman of the Board, had spoken once or twice; it was clear that support did not lie with him.

Ralph closed his eyes. It was nearly a month since he and Ted Batke and the other members of the "fearsome five" (Ted Batke, Ron Bowman, Art Cowan, Bruce Kelly and Ralph Stanton) had tramped the few blocks down Dearborn Street to the Schweitzer farm, past the vacant lots to the fields of corn and mud. The chestnut trees hung solemn above the farm house and dark clouds billowed in a grey sky. It was cold and bleak, yet there was a certain measure of excitement: the property was for sale, the price was reasonable, it was less than a country mile from the Waterloo College campus.

It was clearly impossible to develop a university on the small campus of a sectarian College. The Schweitzer farm could become, would become, the home of a new university. It meant applying for additional funds from the province and, in particular, a charter to grant degrees. Yet, weren't there already students studying in the new co-operative education environment? Didn't the College already have a complement of arts students? Surely the provincial government would support the application for a charter - and provide the necessary funding. The timing was right. Every qualified youth must have access to a university education. It was becoming a familiar cry in the province.

It had taken less than 24 hours for the AAC to agree on the wording of the recommendation: purchase the Schweitzer farm and expand the facilities of the College to accommodate the increased demand for higher education in Ontario. They had approached Gerald Hagey and he had agreed to put it before the Board of Governors of the Associate Faculties.

Yet, it now seemed hopeless.
At 4:55 there was a rustling of papers in the board room. The meeting was coming to an end. The recommendation would be ignored; too expensive, too grandiose. The AAC had been promised an hour, and the hour had ended. There was little more to debate. Members of the Board were collecting their notes.

Then A.R. Kaufman said something, quietly, unobtrusively ... and the rustling of papers stopped.
Kaufman was undoubtedly the most respected member of the board. A wealthy industrialist, philanthropist, president of Kaufman Shoes, outspoken proponent and supporter of family planning (long before it became fashionable), he commanded the admiration and, indeed, awe of the community and, more importantly, the board room.
Gerald Hagey looked at the tall, gaunt man who had sat for an hour without saying a word.

All eyes turned to Kaufman.
There was silence in the room.
"Gentlemen," Kaufman said softly, "I think we should buy the property ... and we should do it soon."
The silence continued for several seconds, then the chairman harumphed and laughed and chuckled - and agreed with Kaufman. Then all agreed.
The debate had ended.

The Schweitzer farm would be purchased and a new university would be created.


 

Saturday, April 24, 2010

Weighting

Recently, I talked about volume weighting stock prices, where prices associated with high volume were more significant. That was fun!

Then Donald W. pointed out these weighting schemes for ETFs. **

That reminded me of the days when I dabbled in various schemes for calculating "weighted averages".

Like evaluating a basket of stocks:
Creating Indexes
Equal-weighted Indexes
Comparing Active & Passive performances

Then there's weighting when it comes to looking at historical performances ... like weighted moving averages:
Exponential Moving Average
A host of other averages
Mamma mia! That, too, was great fun!

Mebbe, when people say:
"The average was ..."
we should respond:
"Average? What average?"  

** Although it's not clear (at first), by "equal weighting" the author means equal dollar amounts invested in each, not equal shares.

Here's an interesting fact:
Had you bought 1 share in each of the 30 DOW stocks, one year ago, your gain would be 43%. That'd be equal-share-weight, eh? (The DOW Index has this weighting. More dollars are invested in stocks with higher prices.)

Aah, but had you bought $1.00 in each of the 30 DOW stocks, one year ago, your gain would be 49%. That'd be equal-dollar-weight, eh?

Before we get too excited about doing MUCH better, consider the previous year.
Equal-share-weighting would have given us -37% whereas equal-dollar-weighting would have given us -36%.

Here's a pretty picture (using the current 30 DOW stocks):

For reasons I don't understand, the equal-shares weighting should be the same as the actual DOW.
I reckon the DOW components have changed over the past year, eh? After all, GM was dumped ... and wasn't CISCO added?
 

Friday, April 23, 2010

FL-what?

When I was staring intently at the ash cloud from that Eyjaf... what's-its-name volcano in Iceland, I noted that the elevation was expressed as FL200, so I needed to know what this flight level stuff was about.

After some googling, this is what I found:
http://www.gummy-stuff.org/flight-level.htm

I'm still working on that ?^#@!& formula ...
 

Thursday, April 22, 2010

Stirex Knives

Some twenty years ago, Heidi did a project for a researcher at the Univ. of Waterloo ... on assistive devices.
One of the devices was a neat knife.
It had a handle at 90 degrees to the blade.

When the project was completed, Heidi got to keep the devices. (I guess that was her salary, eh?)

For 20 years she's been devoted to that knife.
Why aren't all knives made that way?

Anyway, her old knife was getting dull, so I googled.
Ain't google wunnerful?   Stirex Knives
 

Wednesday, April 21, 2010

Volume weighting

Once upon a time I got very excited about volume-weighted stock prices.
Prices associated with high volumes should have a greater weight, right?

I'd calculate the vol-wgt'd price like so:
Pvol-wgt = Pclose * Volume / (Average Volume)

Then I'd go through every conceivable Buy-Sell strategy (based upon closing prices) and substitute volume-weighted closing prices.

For some reason, I lost interest in that ritual.
Can you see why?

-----------------------------------------------

What's remarkable (to me, at least) is that the violent behaviour of the vol-wgt'd price don't change things so much.
For example, long, long ago (and far, far away) I played with a Buy/Sell ritual called ADX: the Average Directional Index.
When I introduced volume-weighting (and called the result VDX), it don't hardly change the Buy/Sell signals.

For example:
(Without weighting it's ADX. With weighting it's VDX.)







Indeed, only 3 of the 30 DOW stocks have their (current) signals changed.

 

Katla webcam

Keep your eye on volcano Katla!

Will it blow?
 

Sunday, April 18, 2010

Iceland

Iceland sits on the edge of a tectonic plate:

Click to enlarge.

During the late 18th Century, continuous volcanic eruptions in Iceland heavily damaged a quarter of the island nation, and blotted out the sun's light for several years.
Can you pronounce Eyjafjallajökull ?

There may be other nearby eruptions ... soon.
Like the much larger Katla:

President of Iceland, Ólafur Ragnar Grímsson, said that the current eruption was just a warm-up for the eruption of Katla. Luckily, he's not a geologist.
There's a Katla webcam here.

What about this one?

Grímsvötn: In the year 2004!
It grounded plane traffic.
--------------------------------

In May, Heidi & I are planning a cruise to some Greek islands. I stare intently at the ash cloud to see if'n it'll reach Venice (where our cruise begins).
Note#1:
SFC/FL200 means from the Surface to 20,000 feet.
Note#2:
Read the Reykjavík Grapevine.
--------------------------------

 

Friday, April 16, 2010

Derivatives

I was just reading Paul Krugman's article (love that guy!) and noticed his comment about:
... derivatives, the complex financial instruments Warren Buffett famously described as "financial weapons of mass destruction".

I recall when I thought derivatives meant dy/dx.
I also recall this humorous look at derivatives.
Well ... it makes me laugh.

Here's what I larned.
-----------------------------

It's been said that:
Math may have caused the financial crisis.

Conclusion? Math is dangerous!



 

Thursday, April 15, 2010

World in the morning

Every morning I check the World,
to see who's up at this time o' the morning.

Then I check the U.S. futures.

Then I check preMarket trading for a BIG coal stock.
'cause I like my coal stocks, eh?

Then I check to see how coal has been doin' recently.

Then I get ready to Buy or Sell,
my finger poised on the broker's button(s).

Alas, it don't do me no good ...

 

Ponzo Illusions

I recently ran across slick examples of the Ponzo Illusion.
This is Mario Ponzo's original:


Here are others:




Okay, so I'm hooked on illusions
------------------------------------------

So, does this guy get smaller as he gets closer?



Just kidding

 

Wednesday, April 14, 2010

Probabilities


I often think I should announce that I have a wunnerful scheme that's guaranteed to make money 95% of the time!, over 10 years.

Then you try it and lose money.
Then I say: "Too bad. You're in that last 5%."
You say: "So what's that 95% all about?"
Then I say: "It means that if you repeated my scheme a jillion times, you'd make money 95% of the time.".

Cute, eh? I know perfectly well that you can't repeat it a jillion times ... so I'm correct, in my announcement.

Indeed, I'm always amused when gurus say that there's a 95% probability that your retirement portfolio will survive 40 years with an x% withdrawal rate.
Now, if you believed in a hundred reincarnations ...

Aah, but what if you repeated my scheme hundreds of times? Then, if it were efficacious, you should be able to make money, eh?
Indeed, even if my scheme worked, say 60% of the time, you should make money if'n you applied it hundreds of times.

Okay, so I been thinkin' about that Blake ritual for Buying and Selling stocks mutual funds.
Blake identified funds where the probability of success was over 60% (based upon analysis of historical data) ... then he traded like crazy!!

Alas, that'd require that trading fees were minimal.

Yesterday, Ron McEwan wrote to me about the Blake ritual:
The US government employee retirement plan (Thrift Savings Plan) is the largest pension plan in the world. You could trade in and out of about 10 different funds as much as you want with no charges. One day someone at the Fed found out that some guys had made themselves over 3 million dollars using a similar strategy. It wasn't illegal, but shortly after it was discovered, the Plan changed the rules to make it unprofitable.

Ron also provided these: Click!   Click!

 

Tuesday, April 13, 2010

A buying strategy

Somebody wrote and asked about some Gil Blake method for buying and selling.

Of course, I had never heard of the guy ... but I did find these comments by Blake:
"If the Dow climbs 10 points, what's its expected further excursion before reversing?"
and
"... once they've gone, say, 1 percent in one direction, they're likely to go 2 percent further before they go back again."

Huh? Is that true?
So I decided to check out that observation by looking at, say, GE stock.
Well, not exactly that observation.
I looked at the total gain over a moving n-day window.
When the gain exceeded 1%, did the gain for the (moving) time period continue to increase?
If that happened most of the time, then should one buy when that occurs?
Would that be following some "trend"?

But what's a good value for n?
Should we look at the gain over a window of n = 3 days
or maybe n = 4 days ... or what?

Anyway, to make a long story short, I got some charts that look like this:


Now I gotta massage that spreadsheet.
If we see a nice n-day gain, how much more can we expect?
Click for a pretty picture.
 

Monday, April 12, 2010

Surfboards

I have a friend who builds surfboards.
A few years ago he asked me to write a spreadsheet that would help design the "shape" of the board ... so I wrote this.

Although I didn't think it was particularly useful, it was fun.

Today I get a message from somebody at the Atlantic Surfing Museum asking to stick a link on their site. He said the surfboard thing was cool.

Now, I see it was not only fun but also cool.


 

Distributions

Once upon a time I looked at the problem of finding the relationship between the Standard Deviation of stock returns and stock prices.
Indeed, Bollinger Bands use the SD of prices (over the past umpteen day) to provide Buy & Sell signals.

Anyway, the problem (mathematically speaking) might go like this:
You have a set of returns, {X}, with a known distribution.
You pick n at random and calculate:
Z = (1+X1)(1+X2)...(1+Xn).
Them's the prices, eh?
So what's the distribution of the Zs?

After thinking about it, off and on (for years), I figured I was just too schtoopid to solve the problem -- even if I assumed the set of returns were Normally distributed.
(Math-types always make such simplifying assumptions.)

Then I recently ran across some papers about the distribution of the product of just two random variables.
It involves (are you ready?) K0.
He's a Bessel function. I met him before.

Then I run across a paper dealing with the distribution of the product of three random variables.
It involves Meijer G-functions.
Huh? I ain't never met her before.

Somehow, I feel better ... and I'll give up this quest 'cause I now know I am too shtoopid
 

Tuesday, April 6, 2010

$USD/$CAD




Heidi keeps a $USD bank account and sticks money there when the Canadian dollar is doin' good .... for trips to visit our kids South o' the Border.

Now she's heading out the door ... to the bank.