Pages

Monday, August 25, 2014

Don't Imagine, You will be Brave as Hell

Ok so I shamelessly stole this from a great foreign flick, can you guess which?

Just think about the title, seriously, just think about.

Apply it to anything and everything.

Nothing more needs to be typed.

Thursday, August 14, 2014

Robin Williams Suicide

I don't get it. This guy was 63, super rich, married, and had 3 kids. Really why? I think that's the question most people are asking.

Honestly whenever I think of Robin Williams I think of a bad date I had in the 90s with some girl at the movie theatre at a Mrs. Doubtfire movie.

Anyways I don't get it. My life, and most people's lives, appear to be nowhere near as amazing as this guys, but he kills himself?

I just don't understand, Robin Williams was in Good Will Hunting, one of my all-time favorite movies. He got to make one of the greatest movies in the history of the freaking world, and he hangs himself?

I just do not get it.

Why Individual Stocks are Riskier than Other Investments

I could summarize this post with one sentence, seriously, you don't need read further after this,

Individual stocks present company specific risk.

Really, that's it, that's the biggest downside. I'm not saying one should NOT own any individual stocks, but if you do, realize that your entire investment could be completely wiped out. It does not matter how great or well known the company is, the whole "buy what you know" philosophy is just a clever catch phrase due to Lynch. 

Nobody knows what the future will bring.

Nobody is bulletproof.



Saturday, August 9, 2014

Every convergent sequence is bounded, proof

Suppose we have a sequence a_n which converges to L.

Let e > 0, then there is an integer N > 0 such that for all n > N we have,

|a_n - L| < 1. Why 1? Well 1 is a number, we can use any positive number here.

Then adding and subtracting L and using the triangle inequality we have,

|a_n| = |a_n - L + L| <= |a_n - L| + L  < 1 + L for all n > N.


Set M = max{a_1, a_2, ..., a_(n-1), 1 + L}

Then, for ALL positive integers n we have,

|a_n| <= M.

This shows the sequence is bounded.



Understanding The Binomial Probability Mass Function Formula

The probability mass function for a binomial random variable X is given by,

P(x) = nCx p^x * q^(n-x)

This is the probability of exactly x successes among n trials in a binomial experiment where,
p denotes the probability of success
q denotes the probability of failure
n denotes the number of trials
x denotes the number of success
nCx is the number of ways to choose x objects from a group of n without regard to order


Ok so how does this formula make sense?

So we have n spots,

_ _ _ _ ... _ _ _

We want to choose x of them for our successes, and there are nCx ways to do that.


Ok we want x successes, by the multiplication rule that means we have,

p*p*...*p <--- x copies of p
p^x.

That leaves n-x spots, those must be the failures,
q*q*...*q <--- n-x copies of q
q^(n-x)

Put it all together, and we have

nCx p^x * q^(n-x)

Simplistic but it should help provide some insight!

Nice Convergence Proof

This is an interesting statement and proof I think.

Here is the statement.

Suppose that lim x->inf f(x) = L and that f(n) = a_n for every integer n. Then lim a_n = L.


Proof.
Suppose lim x-> inf f(x) = L. Let e > 0, then there is a postive integer N > 0 such that for all x > N, we have,

|f(x) - L| < e.

In particular, for all positive integers n > N, we have,

|f(n) - L| < e
|a_n - L| < e.

Done.


How is this useful?

Well suppose you have a limit, like say,

lim n->inf n/e^n.

It is clear that the answer is 0 because the exponential function grows faster than any polynomial, but what if we wanted to show it? Well one solution is to use L'Hopital's rule, but we can't really use L'hopitals with sequences, so we instead think of it as,

lim x->inf x/e^x = lim x->inf 1/e^x = 0 where we used L'hopitals.


It is important to note that the converse of our original statement is NOT TRUE.

Take a_n = sin(npi). Here lim n->inf sin(npi) = lim n->inf 0 = 0, but,
lim x->inf sin(xpi) DNE.

Therefore the moral here is, you can use l'hopitals with sequences but keep in mind everything should make sense if your n is actually a real number x. If it does make sense, feel free to be abusive and use l'hopitals, most people do it, and if people do it then it's ok right?:)

I hope this has helped someone out there on the internet!

A continuous function which is not differentiable, proof

Set f(x) = |x|.

First let's show it's continuous.

If x > 0, f(x) = x is continuous, if x <0, then f(x) = -x is also continuous. We just need to show it's continuous at x = 0.

Note,

lim x->0^+ |x| = lim x->0^+  x = 0  and lim x > 0^- |x| = lim x->9^- (-x) = 0, whence
lim x->0 |x| = 0 = f(0), so continuity has been shown.

This function is not differentiable at zero. To see this, note,

lim x->0^- (f(x) - f(0))/(x - 0)
lim x->0^- (|x| - 0)/(x - 0)
lim x->0^- |x|/x
lim x->0^- (-x/x)
lim x->0^- (-1)
-1

Likewise,

lim x->0^+ (f(x) - f(0))/(x - 0)
lim x->0^+ (|x| - 0)/(x - 0)
lim x->0^+ |x|/x
lim x->0^+ (x/x)
lim x->0^+ 1
1

Therefore lim x->0 (f(x) - f(0))/(x - 0) DNE, so the function is not differentiable.

This is worth knowing how to do, it might save your life some day!



Proof for the sum of the first n integers

Let,

S = 1 + 2 + 3 + ... + n
S = n + (n-1) + (n-2) + 1

Now add,

2S = (n + 1) + (n + 1) + (n + 1) + ...+ (n + 1) <--- there are n terms here
2S = n*(n + 1)
S = n*(n + 1)/2

Done!

Permutation Formula Proof

If you have n distinct objects, the number of ways to arrange r of them is,

nPr = n!/(n - r)!

Most people memorize this formula, which is fine, there is nothing wrong with memorizing things, but most books do not prove this.

Let's prove it!


We have n distinct objects, and we want to arrange r of them, hence by the multiplication rule this can be done in,

n*(n-1)*(n-2)*...*(n - (r-1)) ways.

Notice we stopped at r-1 instead of r. To see think of it backwards
n corresponds to 0
n -1 corresponds to 1
n-2 corresponds to 2
.
.
.
n - (r-1) correspoends to r -1

There are exactly r numbers here: 0, 1, 2, 3, ..., r-1.


Ok so now we just need to show that what we have above is the same as n!/(n-r)!.

We can "complete the factorial" if that's a real thing, I think it is, if it's not it should be:)

n*(n-1)*(n-2)*...*(n - (r-1)) =
n*(n-1)*(n-2)*...*(n - r + 1) =
n*(n-1)*(n-2)*...*(n - r + 1)) *[(n- r) * (n - r - 1)) *. . . *3*2*1]/ [(n- r) * (n - r - 1)) *. . . *3*2*1]=
n!/(n-r)!

That's it, we did it!

Hope this has helped someone out there in the world!

Proof of the nth term test

The nth term test basically says that if an infinite series SUM(a_n) converges, then lim a_n = 0.

The proof is almost immediate. Suppose our series converges to say S and let S_n denote the nth partial sum.

Then,

lim a_n = lim (S_n - S_(n-1)) = S-S = 0. That's it!

Note this is typically NOT how the nth term test is used. Usually in calculus books and in courses people use the contrapositive; that is,

IF lim a_n != 0 then the series SUM(a_n) diverges.


Every Differentiable Function is Continuous, Proof

Everyone knows this, but I bet a lot of people can't prove it! I'm also sure that plenty of people can, but just in case you have never seen the proof, here it is anyways!

Ok so suppose f is differentiable at c.

This means that  lim x->  (f(x) - f(c))/(x-c) exists and the derivative of f at c is this limit;i.e.,

f'(c) = lim x->  (f(x) - f(c))/(x-c).

Ok so now we need to show f is continuous at c, so we need to show lim x->c f(x) = f(c).

Instead we will show that lim x->c (f(x) - f(c)) = 0 and then it will follow from there.

Well the trick is to just rewrite the above limit and somehow use what we already have.

lim x->c (f(x) - f(c))=
lim x->c (f(x) -f(c))/(x-c) * (x-c) =
(lim x->c (f(x) - f(c))/(x-c)) * lim x->c (x-c) = f'(c)*0 = 0.

Hence we showed that,

lim x->c (f(x) - f(c)) = 0.

Then,

lim x->c f(x)
lim x->c (f(x) - f(c) + f(c))  <--- just adding 0 which is the same as -f(c) + f(c)
lim x->c (f(x) - f(c)) + lim x->c f(c) <--- since both limits exist we can do this
0 + f(c)
f(c)

Done!

A Set of Cardinality n has 2^n subsets

This is the easiest way I know how to do it.

Let S be a set with cardinality n.

Recall that nCk is the number of k-element subsets of an n-element set.

Then to find the total number of subsets, we can just literally add them all up.

So we will add up,
All 0-element subsets, there are nC0 of these.
All 1-element subsets, there are nC1 of these.
All 2-element subsets, there are nC2 of these.
All 3-element subsets, there are nC3 of these.
.
.
.
All n-1-element subsets, there are nCn-1 of these.
All n element subsets, there are nCn of these.

So we have,

total number of subsets = nC0 + nC1 + nC2 + nC3 + ... + nCn-1 + nCn

On the other hand, via the binomial theorem we have,
2^n = (1 + 1)^n = SUM(nCk1^k 1^(n-k)) = nC0 + nC1 + nC2 + nC3 + ... + nCn-1 + nCn.

Done!

Why .999... = 1, A Proof

Recall for any convergent geometric series with common ratio r, we have,

SUM( ar^k, k = j, j + 1, j + 2, ...) = ar^j/(1-r).

.999... =
.9 + .09 + .009 + ... =
9/10 + 9/100 + 9/1000 + ... =
9/10 + 9/10^2 + 9/10^3 + ... =
SUM( 9*(1/10)^k, k = 1, 2, ...) =
9*(1/10)/(1-1/10) =
(9/10) / (9/10) = 1

Done!

Boiling Eggs

If you are like me, at some point in your life, you have actually had to go online and search for how to boil an egg. Everyone does it differently, but this is the best way I have found to do it.


STEP 1
Boil some water in a pot. Bring it to a rolling boil. By this I mean you should see lots of bubbles, not just a few.


STEP 2
Put the eggs in the pot and turn OFF the heat.


STEP 3
Leave the eggs in the pot for 10 minutes.


STEP 4

Carefully run cold water into the pot and pour the hot water out into the sink.


STEP 5
Run the eggs under cold water as you peel them.


That's it! This is the easiest method I have found for boiling eggs. I think most people know how to do this, but I didn't and had to learn a few years ago.

I hope this has been helpful for someone out there!

Always Triple Your Bet?

Several years ago I worked with this really funny older guy who was really into money, gambling, and girls. He eventually quit, got a better job, a beeper(yes this was a LONG time ago), and a new car. He had become a high roller in my mind. He would always say, "triple your bet, you can't lose!".

Anyways let's test his theory. Suppose we play a game where if you win, you double your money.

For example,
if you bet 1 penny then you win 1 penny
if you bet 4 pennies then you win 4 pennies
etc...

Ok so now let's take a fake scenario. Suppose you,

Bet 1 penny, lose, so TRIPLE your bet
Bet 3 pennies, lose, so TRIPLE your bet
Bet 9 pennies, lose, so TRIPLE your bet
Bet 27 pennies, lose, so TRIPLE your bet
Bet 81 pennies, WIN, so now you win 81 more pennies.

Ok so much did you lose in the previous games?
1 + 3 + 9 + 27 = 40.

But you won 81 pennies, so your total profit is then 81 - 40 = 41 pennies.

This works every single time. Try it, take some pennies or a piece of paper and a calculator and you will notice that if you ALWAYS triple your bet, you will always eventually end up a winner.

So why don't people do this? To be honest I have no idea, I don't go to casinos often. According to this "cool" guy I used to know casinos set betting limits at the tables. Also if they notice this kind of behavior eventually you will be kicked out.

I don't know why people don't do this. There has to be some kind of rule against this, because it NEVER fails:)




A Tax Free Closed-end Fund at a Discount Yielding 7.05%

The ticker symbol is NMZ, here is a rundown.

NMZ
  • The fund provider here is Nuveen, which has a strong reputation for delivering solid municipal bond closed-end funds. 
  • The expense ratio of 1.28% is considered low when compared to most other municipal bond funds.
  • The dividend is $.076 per share, paid monthly, tax free, with roughly 6.49% being subject to AMT. 
  • At Friday's closing price of $12.94, for every 100 shares, you receive $7.60 a month.
  • For every $10,000 invested you could expect about $58.75 of tax free income every single month, not bad at all.

I do not hold a position in NMZ and have no plans to initiate one in the near future.

As always, make sure to do your own research and make your own decisions before investing.

I hope this post has been helpful to someone out there!

How to get 5.24% Interest Compounded Monthly

Yes, it's true, and all it will take is about $41 to get started.

Step 1
Go to tdameritrade and open an account. There is no fee to open nor maintain an account.

Step 2
Link your bank account and deposit some money. Note for this to work you will need about $41.

Step 3
The next time the market is open, buy 1 share of JNK. There are no commissions to buy JNK through TDAmeritrade.

Step 4
Send them an email through their secure message center and ask that your entire account be enrolled in DRIP.

That's it, every single month about 18-21 cents will be deposited into your account, and then immediately be used to purchase fractional shares. Shares are purchased usually 1-3 days after the dividend pay date.

Warnings
  • JNK is a junk bond fund, so it suffers from both interest rate risk and credit risk.
  • The dividend income from JNK is treated as ordinary income and it is not considered a qualified dividend.
  • You can lose a lot of your principal as the price fluctuates up and down everyday.

Make sure to do your own homework and make your own decisions when investing.

I hope this post has been helpful to someone out there!




Friday, August 8, 2014

Continuous Bounded Derivative

If f(x) has a continuous bounded derivative(say M is a bound), then f(x) - f(y) = f'(c)(x-y) for some c in (x,y), taking absolute values yields |f(x) - f(y)| <= M|x-y|, so f is Lipschitz of order one.

Random yes, but Lipschitz is fun to say!

Intersection of Open Nested Sets which is Empty

Put a_n = (0, 1/n), then a_(n+1) is a subset of a_n for each n >= 1.

Now set I = int(a_n, n = 1, 2, 3,...).

If I is not empty, there is x in I, so x is in a_n for each n, so 0 < x < 1/n for each n. By the squeeze principle x = 0, a contradiction.

Someone asked me this a while ago and this is the answer I gave them. The whole point of this is that if the a_n's where closed and bounded and nested, the intersection would be nonempty.

H u K is a subspace of V iff H is contained in K or K is contained in H

Here, V is a vector space and H and K are subspaces.

If H is contained in K or K is contained in H, then H u K = K or H u K = H and in any case this is a subspace of V.

Now if H is not contained in K and K is not contained in H, then there is k in K\H and h in H\K.

Now both h, k lie in H u K. So let's look at h + k. If this were in H u K, it would be in H or in K. If it's in H, then k = (h + k) - h is in H, a contradiction. If it's in K, then h = (h + k) - k is in K, a contradiction. In any case we reach a contradiction so H u K is not closed under addition. In particular this means it cannot be a subspace.

A similar statement holds for ideals in a ring and subgroups of a group.

Union of a Family of Nested Ideals

Here, we have a family of ideals {I_j} in a ring R. Here j runs through some index set say A.

Also I_1 >= I_2 >= I_3 >= ...

Let's try to show that I = UNION(I_j, j in A) is an ideal.

I is nonempty since each I_j contains 0.
Take r in R and x in I. Then x is in some I_j, so rx is in I_j because it's an ideal so rx is in I.
Take x in I, so x lives in some I_j. Then -x is in I_j so it's also in I, so I is closed under inverses.

Now the more interesting part.
Take x, y in I. Then x is in some I_j and y is in some I_k.
If j = k then x + y is in I_j and hence in I and we are done.
Assume wlog that j > k. Then I_j <= I_k, so x is in I_k. Thus both x and y are in I_k hence so is x + y, and so x+y is in I as well, done.

Vector Space Basis Criterion

Here V is a vector space over some field F and B a finite subset of V.

I will try this off the top of my head, I do not have a linear algebra book handy and I am putting together this statement from random facts so be weary!

TFAE
1. B is a basis for V(ie B spans V and B is linearly independent)
2. Every vector in V can be written as a unique linear combination of elements of V.
3. B is a maximal linearly independent subset of V.


1 => 2
Say 1 holds. Since B spans V we can write every vector in V as a linear combination of elements of B with coefficients coming from F. Take x in V and say we have,
x = a_1v_1 + ... + a_nv_n
x = b_1v_1 + ... + b_nv_n.

Then 0 = x -x = (a_1-b_1)v_1 + ... + (a_n-b_n)v_n. The independence of B implies a_i - b_i = 0, so a_i = b_i for all i. This shows uniqueness.

2 => 1
Assume 2 holds. In particular this means B spans V. Now suppose a_1v_1 + ... + a_nv_n = 0 for some a_i in F, v_i in B. Now 0 is in V, so 0 has a unique representation as a linear combination of elements of V with coefficients in F. But 0 = 0*v_1 + ... + 0*v_n, so uniqueness implies a_i = 0 for all i, so we get independence.

3 = > 1.
Assume B is a maximal linearly independent subset. We only need to show B spans V. So take x in V. Consider the set B u {x}. Now B u {x} contains B, and since B is maximal, B u {x} cannot be independent, hence there are a_1,..., a_m s.t. a_1v_1 + ... + a_(m-1)v_(m-1) + a_mx = 0 where not all a_i are 0. Now a_m != 0. (If it were 0, let k be the largest index s.t. a_k ! = 0, then a_1v_1 + ... + a_kv_k = 0, then a_i = 0 for all i by independence, a contradiction)

Then x = (a_m)^-1 * -a_1v_1 - ... - (a_m)^-1 * a_(m-1)v_(m-1)) is in the span of B, so B spans V.

1 => 3
Suppose B is a basis. Suppose there is some linearly independent set S which properly contains B. Then there is some x in S\B. Since B is a basis, x = a_1v_1 +... + a_nv_n for some a_i in F and v_i in B. Then, 1*x - a_1v_1 - ... - a_nv_n = 0 and all of these vectors are in S since S contains B. By the independence of S, all the coefficients are 0, in particular 1 = 0, a contradiction. Thus no such S can exist and so B is a maximal linearly independent subset.

So we showed 1 <=>2 and 1 <=> 3 so 1 <=> 2 <=> 3 and that's it.


I hope there are no mistakes!

The Limit of a Sequence of Uniformly Continuous Functions

Ok so this is an absolutely beautiful proof.

Suppose {f_n} is a sequence of say real or complex valued continuous functions. We could even assume f_n is a sequence of functions from R^n->R where it's understood the || means the usual euclidean norm. Suppose also that f_n -> f uniformly on some set say A.

Let us show f is continuous.

So take some x_0 in A and let e > 0.

Since f_n->f uniformly on A, there is a positive integer N such that for all n > N we have |f_n(x)-f(x)|< e/3 for all x in A.

Fix m > N. Since f_m is continuous at x_0, there is a delta > 0 such that for all x in A with |x-x_0| < delta we have |f_m(x) - f_m(x_0)| < e/3.

Then for all x in A with |x-x_0| < delta, we have by the triangle inequality
|f(x)-f(x_0)| <= |f(x) - f_m(x)| + |f_m(x) - f_m(x_0)| + |f_m(x_0) - f(x_0)| < e/3 + e/3 + e/3 = e.

Done!

Groups G such that g^2 = e for all g in G.

If G is a group and g^2 = e for all g in G then every element is it's own inverse.

Hence, xy = (xy)^-1 = y^-1x^-1 = yx so G is abelian.

This basically means, anytime we have a group such that g^2 = e, we know G is abelian.

If A^2 = I for a matrix A, then A is diagonalizable

So I'm at Walmart checking out the prices of frozen pizza, and the cute older woman is next to me. She turns to me, smiles, and says "Is it true of A^2 is the identity matrix, that it's also diagonalizable?". Ok so that wasn't funny and that's not how it goes, but this is a VERY useful fact that just comes up so often, at least in the world of mathematics, that it makes it worth mentioning. Here we go.

If A is a matrix such that A^2 = I, then A^2 - I = 0. Set f(x) = x^2 - 1. Then f(A) = 0 by Cayley Hamilton, so the minimal polynomial of A, say p, divides f. In particular this means that p has no repeated factors, hence A is diagonalizable.

HK = KH iff HK is a subgroup of G

Ok so I'm bored and it's late. Time for some random intellectual stimulation. I get enough of that to be honest and I prefer dumb Family Guy episodes or binge watching netflix, but here it is anyways. The setup is as follows.

G a group, and H and K are subgroups of G.


Proposition.
HK is a subgroup of G if and only if HK = KH.

Proof.
Suppose HK is a subgroup of G. Take x in HK, so x = hk, for some h in H and k in K.
Since HK is a subgroup, x^-1 is in HK. Now x^-1 = (hk)^-1 = k^-1h^-1 and this is in KH since k^-1 is in K and h^-1 is in H because K and H are each closed under inverses. This shows HK is a subset of KH. To show KH is a subset of HK the idea is exactly the same, hence omitted!

Conversely, suppose HK = KH. We need to show HK is a subgroup of G. Well first notice e = e*e is in HK because e is in H and e is in K. Next, take x in HK. Since HK = KH, x is in KH, so x = kh for some k in K and h in H. Then x^-1 = h^-1k^-1 and this is in HK because both H and K are closed under inverses. This shows HK is closed under inverses. Finally, suppose x, y are in HK.
This means x = hk and y = h'k' for some h, h' in H and k, k' in K. Then xy = hkh'k'. Now, kh is in HK but HK = KH, so kh = h''k'' for some h'' in H and k'' in K, hence xy = hkh'k' = hh''k''k' and this is in HK because both H and K are closed under the group operation. This shows HK is closed under the group operation and hence HK is a subgroup.

Why Money Management and Commissions Matter

The most important thing in trading is money management.

Take for example our fictional trader Joey.

          \O_ ... {I want to be a trader!}
       ,/\/
        /
        \
                

Joey has a decent job and has been saving his pennies to invest. He has finally  accumulated enough wealth to open a $5000 account at a popular brokerage he saw advertised on CNBC.

Joey is paying $7 per trade.

After spending months paper trading, reading popular financial websites and books Joey feels ready.

When the market opens on Monday Joey goes out and buys 100 shares of stock XYZ at $10. What's the problem here?

Well it's pretty simple, Joey invested 100x10 = $1000 in one position. That accounts for 20% of his portfolio. Furthermore Joey is automatically down $14 which may not seem like a lot but it is 1.4% of his current position.

Hence our fictional trader Joey is already a loser on his first real trade ever and has invested 20% of his portfolio in one particular position.

I used to be like Joey several years ago, and I think most traders are.



Moving Averages and Chebyshev's Theorem

There are plenty of places on the internet that discuss this, so why make another post to litter the world with more information? Simply put to give my perspective on these instruments and explain why they work mathematically.


A simple moving average, or simply SMA, is computed by taking the average of the previous n trading days.

For example, the 5 day simple moving average is S_5 = (x_1 + x_2 + x_3 + x_4 + x_5)/5 where x_1, x_2, x_3, x_4, x_5 are the closing prices of the previous 5 days. Obviously everyday a new average must be computed.

Traders tend to believe that if the moving average is sloping up and the prices are above the moving average, then the trend is up and prices are increasing. This makes sense, because the only way the moving average can get larger is if the closing prices are higher and higher. Remember that the definition of a trend is higher highs and higher lows. Key point: higher highs and higher lows means higher closes, so a larger SMA.

Another reason to use SMA's is that the price is often difficult to read, whereas the SMA gives a picture of the price with less "noise". To be more precise, the standard deviation of the the last n closes of the SMA is smaller than the standard deviation of the last n market price closes.


This is why.

Let's define the following.
(1) s = the standard deviation of the last n market price closes. Formula:  s = sum( (x - SMA_n)^2 )/(n - 1)).
(2) SMA_n = the n day simple moving average. Formula: SMA_n =  sum(x_i)/n.
In both cases the summations run from 1 to n.
(3) S_n = the standard deviation of SMA_n. Formula: S_n = s/sqrt(n).

Notice that as n->infinity we have S_n->0, so the larger that n is the smaller that S_n is. Also notice that s <= S_n for n >= 1.

This implies two things,

(1) The larger the number of days we use, the smaller the standard deviation of the SMA_n.
(2) The standard deviation is of SMA_n is always smaller than the standard deviation of the last n market price closes.

Simply put, the standard deviation of the simple moving average is smaller than the standard deviation of the prices.

What is the standard deviation? Well if you look at the formula you can see that it is some sort of  average basically. It tells you, how far on average the prices will lie from the mean.

How can it be used? Well Mr. Chebyshev has the answer.


Chebyshev's Theorem
For any data set, at least 1-1/k^2 of the values lie within k standard deviations of the mean. Here k is any number bigger than 1.

Take for example k = 2.

Then for any data set, at least 1-1/2^2 = .75 of the values lie within 2 standard deviations of the mean.

Take k = 3.

Then for any data set, at least 1 - 1/9 = 8/9=.889 of the values lie within 3 standard deviations of the mean.

Here is an example.
1, 2, 3, 4, 5,100

The mean is xbar = (1 + 2 + 3 + 4 + 5 + 100)/6 =19.17 (rounded).
The standard deviation is s =  39.625 (rounded).

Chebyshev says that at least 75% of the numbers that we have should lie within 2 standard deviations of the mean. This means at least 75% of the numbers that we have are between,

xbar - 2s and xbar + 2s. In interval notation is this can be written as,

(xbar - 2s, xbar + 2s). Plugging in the numbers we have,

(-60.28, 98.42).

This is called a 75% Chebyshev Interval for the mean. Note that we have 6 numbers, and 5 of them lie in this interval, so we have (5/6)*100% =  83.33% of our values lie in our interval.

Is Chebyshev wrong? Absolutely not. Remember that Chebyshev says that at least 75% of the values will lie in our interval. In our example, we have 83.33% of the prices lying here.


Other Remarks.
- You can keep going and increase k as much as you like.
- Chebyshev's only tells you this information for the data set in question. In the market you always have a new unknown price added to your data set.
- Bollinger bands are related to all of this. Usually the middle line is the 20 day SMA, and the top and lower lines are two standard deviations away from the SMA.

Use this information at your own peril. Nothing here is guaranteed to be correct as I wrote this from the top of my head.

I hope this post has helped somebody out there!

What is a Closed-End Fund?

I absolutely love these. These are extremely unpopular and the issuance of new closed-end funds this year is at a multi-year low.


What are they?
  •  Closed-end funds trade on stock exchanges. You can buy and sell them like stocks. 
  • Closed-end funds have a NAV, which stands for Net Asset Value. Closed-end funds selling below their NAV are considered to be at a discount, and those above are considered to be at a premium.
  • Their shares at issued at the IPO, then the fund is "closed"; i.e., no new shares are issued, whence the prefix "closed". Note with ETF's shares are created and redeemed.


How can they be beneficial?
  •  They let you buy things at a discount. For example a closed-end fund may have an ask price of $10 and a NAV of $9, meaning it is selling at a 10% discount. This basically means you get $1 for free of actual securities whether it be stocks, bonds, or preferred shares.
  • They provide leverage. The word leverage instills fear especially after the distant yet recent memory of of the 2009 financial collapse but worry not, it has been proven that closed-end funds with leverage perform better over the long run than those without. 
  •  The bond funds provide a high dividend income, especially the leveraged ones.
 What is the downside?
  •  Leveraged closed-end funds have much more volatility than non-leveraged funds.
  • They generally have high expense ratios. For example the average expense of a leveraged municipal bond is roughly 1.60%. At the same time such a fund usually yields 6% to 7% tax free! Remember they are volatile, if rates rise they collapse.
 Other Remarks
  • I would be weary of closed-end funds that distribute any sort of return of capital. One could make a positive argument for this but it reduces the NAV, and I personally don't care for anything that returns capital. It reduces the NAV and thus reduces the value of your investment in the long run.  
  • Most municipal bond closed-end funds do not return capital but many taxable high yield bond funds do. Keep in mind the leveraged funds perform better over the long run but they have much more volatility.
  • People "say" closed-end fund prices are heavily influenced by individual investors. I can see why this might be true, for example last year Barron's released an article on closed-end fund premiums and they tanked for a few days. Some of the PIMCO funds lost like 20%.
There is a lot more to learn about closed-end funds before buying in my opinion, but I have provided the most important stuff I think. I would recommend that anyone who is considering these check out www.cefconnect.com first.

Remember you don't have to be an expert. There are enough self-proclaimed experts in the world, and when it comes to investing nobody has a crystal ball, nobody knows the future. Use your own judgement and make your own decisions, do not follow the crowd, pick your own!

I hope this post has been helpful to someone out there!

Passive Income Sources

For the last few years I have been researching ways to generate passive income. Here is what I have discovered and what works best for me.


Commission Free ETFS
The holy grail? ZERO commissions are involved. This is not a get rich quick scheme, but you can buy lots of high paying dividend ETF's via various brokerages.

Closed End Funds
These are just NOT popular, but I absolutely love these. Check out cefconnect.com for a nice screener. The only forum I have found that discusses these is on morningstar and apparently everything I own is not popular. People seem to love PIMCO and I don't get it. I don't care how great Bill Gross is, all his Muni CEF's sell at premiums and I refuse to buy.


Individual Stocks
Ok so I did the unpopular thing and sold all of mine a few weeks ago, terrible I know. I just cannot accept the company specific risk involved. Also despite knowing a little mathematics and finance I don't feel like I know enough to invest in individual companies.

Blogging
Ok so it's not really passive because it takes time to post stuff. I'm relatively new to this to be honest and I'm not even a good writer. I read somewhere you can make money by blogging so I started a blog yesterday. It's fun, I like posting, although I have no idea how to draw traffic and be good at it. Everyone says wordpress is better but I don't care. Blogger is easy:)



Thursday, August 7, 2014

The Best Coins to Buy on Ebay

I've been collecting coins for a while, but unfortunately my collection is pretty small because I go through phases where I sell them all. Now when I sell them one of two things happens, either I get more than I paid for it or less than I paid for it. Why? Well because the price of gold and silver fluctuates heavily.

There seems to be few solutions to this problem.

1. Don't buy gold and silver coins. Instead by pennies and nickels.
Let's face it, that sounds pretty boring, I personally stick to silver since I can't really afford gold coins. See below for more.

2.  Buy only key date and semi-key date coins.
These have a lot more numismatic value than say a typical cleaned and worn 1943 Mercury Dime.

3. Buy only graded coins.
This is my favorite. Anything graded by PCGS, ANACS, NGC, or IGC is good. These coins tend to retain their value. Sure the prices fluctuate, but they don't depend so much on the price of gold and silver.

If you are interested in buying key date and semi key date coins, the best way to do this is first to get a few books. I own two, linked below. Yes they are expensive but they are really necessary if you want to make smart purchases on ebay.

Bodybuilding Supplements That Actually Work

If you do a quick search on the internet for supplements you will get TONS of information. There is always a new supplement out there and you never know what is in it because the FDA does not check. If a protein bar says it has 30 grams of protein and it is super tiny, you need to ask yourself how this is possible. Chances are the claims are false.

Below I have listed the things that have worked for me in the past and have worked for others. These supplements are considered by most people to be safe, just drink lots of water.


Whey Protein
Optimum Nutrition seems to be the best bang for your buck. They overshoot the protein content I believe but it contains roughly 90% of the stated protein. Note most brands contain nowhere near as much.


Vitamin E, Zinc, and a Multivitamin
No, Flintstones chewables don't count. Do they still make those?

Fish Oil Caps
The benefits have been proven time and time again.

Creatine
Kind of an optional one here. If you are lifting heavy and hard go for it, just drink tons of water.


Obviously there are other things that probably work as well, but I like to keep it safe when it comes to this kind of thing.




How much you really lose when playing the lottery

Most states have some kind of lottery, and for a ticket the minimum price is usually $1. Let's take a generic lottery game where you pick four numbers, 0 through 9, for example 2278. If those are the winning numbers you collect and win $5000.

Now suppose you go play this game tonight and buy a single ticket. If you lose you just lost $1. If you win you collect $5000, minus the one dollar it cost you to play, but who cares about that right?

Ok so here is how you work it out, for any lottery game, first workout the expected value.

Expected Value = (What you win) *(Probability of Winning) + (What you lose)*(Probability of Losing)

For our game, if you win, you collect $5000. If you lose tonight, you only lose $1, so we'll count that as -1.

To figure out the probability of winning, note there is only 1 way to win and 10*10*10*10 = 10,000 ways to play, so the P(winning) = (number of ways to win)/(number of ways to play) = 1/10000


To figure out the probability of losing, note there are 9999 ways to LOSE this game, yikes!
This means P(losing) = 9999/10000


So finally,

Expected Value =   (5000)*1/10,000 +  (-1)*(9999/10000)
Expected Value = -.4999, so let's call that a $0.50 loss.

What does this mean? There is no way you can lose 50 cents if you play this game tonight, you either win or lose, so what in the world is this?!

Well there is something called the Law of Large Numbers that says that in the long run, how much you lose on average approaches 50 cents per game. Think about it, if you keep playing over and over you will eventually win, and you will also lose a lot, but in the long run, if you had an infinite amount of money and just played a lot every single day forever, your average loss per game gets closer and closer to 50 cents.

In other words, you are still guaranteed to be a loser, no matter what!

Of course if things weren't this way, the lottery would be out of business, there wouldn't be any casinos, nor would there be any gambling, because all of these institutions would fail in the long run.

I hope someone has found this post helpful!




How to Buy an Entire Country for $11.73

As of posting this, that is the current ask price on iShares MSCI Japan ETF, ticker symbol EWJ.

This ETF holds 308 positions in various companies located in Japan. By spending $11.73 you are essentially investing in all of Japan, or as much as you reasonably can by buying a single product.

What about commissions? This ETF is available commission free at both TdAmeritrade and Fidelity.

Should you buy it? I don't know, but it cost less than ordering pizza and it pays you a dividend twice a year.

Will you lose money? Maybe yes, but in theory it should never go to zero unless Japan implodes, which I feel is unlikely.

Just a thought:)

Why Simple Moving Averages Move Less Than Stock Prices

Most traders use simple moving averages as part of their trading techniques. They buy when the stock price is above a certain moving average, or sell when it is below. Some traders also look at moving average crossovers for buy and sell signals. All of this information is found in the plethora of trading books available. Some are better than others, but we'll discuss that later.

Now go and look at your favorite stock chart, and plot several moving averages, 5, 10, 20, 50, 100, 200, etc. If you look at the percent increase and percent decrease for the stock price on a given day and compare it to the moving average, you will notice the moving average moves less than the stock price;i.e., it has a smaller percent increase/decrease. This is one of the main reasons to use moving averages, because they give you a better picture of what the stock price is doing by removing some of the "noise".

This should all be somewhat intuitively true, but why is true mathematically?  Let's start first with the following.

Define X_m = (x_1 + x_2 + ... + x_m)/m to be the arithmetic mean of the closing price of the last m trading days. This is the m-day Simple Moving Average. Once a new day passes, X_m changes, more precisely,
x_1 becomes x_2
x_2 becomes x_3
.
.
.
x_m becomes x_(m + 1),

where x_(m + 1) is the last days closing price.


Now if you remember any statistics, X_m is a random variable, therefore it actually has a standard deviation.

Now let SIGMA = standard deviation of the closing prices of the stock.

Then the standard deviation of X_m is  SIGMA/Sqrt(m).

Note that SIGMA is always smaller than(or equal to in the case where m = 1) than SIGMA/sqrt(m). More precisely

SIGMA <= SIGMA/Sqrt(m), always, no matter what, even if it snows in Puerto Rico.

This means that simple moving averages, on average, move less than stock prices.

Oh and as far as books, the best one I have read is linked below. Yes it is expensive but if you are going to buy a book on TA, buy this one, it is worth owning. The methods described in this book work, the problem is that most people don't follow those methods.

The First Investing Book You Should Buy

When you are first getting started with investing you need to find some source of practical advice that you can at least count on with some reliability. Going online and searching for investing is going to bring up thousands of hits, most of which give the same advice over and over again or just give bad advice.

One book that sticks out from the rest is The Intelligent Investor by Benjamin Graham.

This book is not perfect, and at times I feel it reads like a Vanguard commercial, but it is the best book out there I think for someone that is just starting out. Even if you have been investing and/or trading for a while, if you have not looked at this book I really think it's worth a read.

I could write a lot about this book as it gives so much useful information. Sadly I have found that most people on the internet which praise this book rarely follow it's advice. As with anything read it critically, and then make your own decisions after reading it.

How to REALLY get car insurance for about $20-$30 a month

Every time I watch TV all I see are car insurance ads, save $300, save $400, etc. In my mind, insurance is the greatest scam, or money making machine if you are the insurer, in the entire world.

Basically you are paying for protection in case something in the future occurs. If that something never occurs then it's just money that was thrown away. You can say to yourself, yes ok, but what if something had happened? Well if it didn't, it was a waste, period.


Anyways whether it's important or not is not really the issue, because well all know it is LAW to have your car insured. The amount of coverage required varies by state.

So how do you really find cheap insurance?

STEP 1
Go to the website for your states DMV office and find out what the state requires as the minimum coverage. The reason you do this is because by default most insurer's "minimum coverage" packages require much more than what the state says you need. Why do they do this? Well it's simple, they want to make money of course!


STEP 2
Go online and find a reputable insurance company. Anything that let's you customize the options online will work.


STEP 3
Set the options to what the state requires. Feel free to play with them if you want a little more coverage.



That's it!

I hope this has helped someone out there!


Wednesday, August 6, 2014

Constructing A Home Gym Workout Routine

A quick search on the internet will yield hundreds if not thousands of workout routines. You can find routines performed by current bodybuilding champions to those performed by the legendary Bodybuilders of the 70's like Arnold Schwarzenegger.

The problem however is twofold. First, most workout routines you find involve machines as they are geared towards people who go to a gym. Secondly there might be certain exercises you are uncomfortable performing or simply can't perform due to an injury. To solve this problem, below I have provided a template which you can use to create your own workout routine. This template should keep your workout exciting, interesting, and you should see great results if you stick to it! As always, it's best to consult your doctor before engaging in any intense physical activity.


STEP 1: Pick two exercises from each group

Group 1
Barbell Bench Press
Dumbbell Bench Press
Dumbbell Flyes
Dumbbell Pullovers
Incline Dumbbell Bench
Decline Dumbbell Bench
Incline Barbell Bench Press
Decline Barbell Bench Press


Group 2
Dumbbell Rows with Two Dumbells
One Armed Dumbbell Row
Barbell OR Yates Row
Dumbbell Pullovers
Dumbbell Shrugs

Group 3
Dumbbell Side Lateral Raises
Arnold Press
Standing Dumbbell Shoulder Press
Standing Barbell Press
Front Dumbbell Raises
Plate Raises

Group 4
Barbell Curl
Dumbell Curl

Hammer Curl
Zottman Curl


Group 5
2 Arm Dumbbell Overhead Extension
One Arm Dumbbell Overhead Extension
Barbell Overhead Extension
Bench Dips

Group 6
Dumbbell Squat
Dumbbell Lunge
Barbell Squat(if you have a rack)
Barbell Lunge(if you have a rack)
Dumbbell Stiff Legged Deadlift

Optional
Throw in some crunches and forearm work. Weighted crunches with dumbbells work best. Forearm work could involve wrist curls or reverse wrist curls over a bench.


STEP 2: Perform at least 2 sets of each exercise.

Here is an example of performing 5 sets on the dumbbell bench, for someone whose 10 rep max is 60lbs.
Set 1: 20lbs x 20
Set 2: 30lbs x 15
Set 3: 40lbs x 12
Set 4: 60lbs x 10
Set 5: 60lbs x 10 OR drop back down to a lower weight.

The numbers I am using are not absolute, vary it, mix it up, and most importantly have fun. The hardest thing about working out is being consistent. By varying your workouts and being creative you can maintain interest and stay consistent. You will also notice that only one or two sets were very heavy sets. Five sets does not mean five sets at 60lbs x 10 in this example. Why you ask? Well that leads us to step 3.

STEP 3: Workout every other day, sometimes taking two days off

Because your workouts are not absolutely destroying any particular muscle group you are able to train more frequently. If you absolutely must workout everyday then do cardio on off days, but if you are doing this properly you will appreciate those off days.



I hope this post is helpful. If you don't have a home gym and you want to set one up, I would recommend buying actual plates and nonadjustable dumbbells locally, and possibly looking online for other things like adjustable dumbbells.

Below are some links for equipment that might be helpful when constructing a home gym. I do not own these exact items but I do have a bench and adjustable dumbbells. Note I paid $50 for just the dumbbell bars when I bought my adjustable dumbbells - they came with NO weights, so the link below to Amazon appears to be a VERY good deal.