Wednesday, November 30, 2011

Quotes for future

Nowhere in the contract says I have to be consistent.

Tuesday, November 29, 2011

A fun funding platform

for music, film, art, technology, design, food, publishing and other creative fields.

Friday, November 25, 2011

Knickerbocker 60k results

Completed last week's race in 189th position out of 270 finishers.  I haven't been running long distances since the operation in June and the result shows that I wasn't ready for this distance.  Need to ramp up weekly miles before snow falls (again!).  Below is a graph of a simple average race pace (x-axis in minutes) versus the standard deviation (y-axis in minutes) the 9 loops only.   The race also had a 1.46 mile out and back in the beginning to complete the distance to 60km which I didn't include in the computations.
 (photo credits Brightroom)
My coconut water bottle on one hand and homemade gel (yogurt and honey) on the other.  For some reason I was starving all the time.

Ramanujan's Series for 1/π: A Survey

Ramanujan’s Series for 1: A Survey

Nayandeep Deka Baruah, Bruce C. Berndt, and Heng Huat Chan

Tuesday, November 22, 2011

Friday, November 18, 2011

Outer class instance variable access from inner class

Inner classes have access to enclosing class variables.
    public class Outer {
        private int foo;
        class Inner {
            private int bar;
            Inner() {
       = foo+1;

What if we want to rename bar to foo as well? "this" prefix will refer to inner class swe have to qualify it with outer class as below.      
    public class Outer {
        private int foo;
        class Inner {
            private int foo;
            Inner() {

Monday, November 14, 2011

Data Driven Documents

D3: A javascript library, orthogonal to css, html, and svg

Wednesday, November 9, 2011

Sharpe Ratio optimization with Matlab 2007a

Never versions of Matlab has this feature built in but for the people still on the old version may help. 


[w,fval] = fmincon(@(w) -w'*r/sqrt(w'*c*w),ones(N,1)/,-eye(N),zeros(N,1),ones(1,N),1);


objective term: -w'*r/sqrt(w'*c*w)   is the formulation of Sharpe Ratio, where r is the excess return vector, c is the covariance matrix,and w is the security weights we're optimizing. Since it's a minimization algorithm we have to negate it.


N is the dimension of the problem where c and r dimensions need to match.

initial value: ones(3,1)/3 to start the search

long only constraint:   Aw ≤ b   where A=-eye(3), b=zeros(3,1) which becomes w ≥ 0

budget constraint: Aw=b  where A=[1 1 ... 1], b=1 which becomes ∑wi = 1


the outputs are the weights and the optimal function value at these weights.




Friday, November 4, 2011

cool tools

Blank   transcribes your voice mail (human assisted) and send it to you as an email.  Good for short reminders, calendar entries, even for longer text. You can call from registered five phone numbers or with a PIN from any other phone as well (they use caller id to identify the account).  Available worldwide.

Best part... it's free.