WhooL !

Fantastic World 数量投资 程序交易 以及 市场动态

WhooL  ! header image 4

Entries Tagged as 'CODE'

HALTON序列

十二月 12th, 2009 No Comments

function result = halton( m,base,seeder ) %生成HALTON序列
% Check inputs if nargin < 3 seeder = 0; if nargin < 2       error(‘MATLAB:Halton:NotEnoughInputs’,…              ‘Not enough input arguments. See Halton.’); end end [...]

Tags:   · ·

binomial MATLAB CODE

十一月 17th, 2009 No Comments

上周的一个作业,很简单的考虑,没有div 只有r sigma t so K M
function value=Amercall(r,sigma,S0,T,K,M)
% compute constants dt=T/M;  Q=(exp(-r*dt)); Beta=(Q+exp((r+sigma^2)*dt))/2; u=Beta+sqrt(Beta^2-1);  d=1/u; p=(exp(r*dt)-d)/(u-d);
% initialise asset prices at maturity (period M)    for i=1:M+1        for j=1:i             S(j,i)=S0*u.^(j-1)*d.^(i-j) [...]

Tags:   · ·

10 Rules of the Rich

九月 27th, 2009 No Comments

 
1. Give yourself a raise. 10% of your net income should go on auto-deposit into your 401(k), IRA, health savings account, etc. Period. Stop whining, complaining or procrastinating. It’s tax deductible. Pay yourself now, or pay the IRS later. And if you don’t know how to invest, put it in a FDIC-insured [...]

Tags:   · · · · · · · · · · ·

Statistical Significance and the Magic Formula

七月 25th, 2009 No Comments

It’s been a while since I first read Joel Greenblatt’s The Little Book That Beats the Market, and was bowled over by his Magic Formula’s historical returns versus the S&P 500 …

But one thing that bothered me when reading Greenblatt’s book was my memory of the Foolish Four. It was a [...]

Tags:   · · · · · · · · · · · · · · · ·

Call Option vs. Long Position

七月 23rd, 2009 1 Comment

Burton Malkiel has a nice introductory example of how call options work on page 36 of the latest release of his classic, A Random Walk Down Wall Street.
He uses the price of tulip bulbs in 17th century Holland for his example but I thought I’d repeat it using the current price of Apple Inc. stock [...]

Tags:   · · · · · · ·