- eg, sed 's/\n/,/' is not working; instead, I use tr to accomplish what I want to do.
Monday, January 18, 2010
Friday, December 11, 2009
Monday, December 7, 2009
sed in Linux
1- say for example, in Shell programming, you want to append some variable at the string end, this wont work - sed 's/$/$temp/'
what we can do is use two sed's - sed -e 's/$/dummy/' | sed "/dummy/$temp/".
Friday, December 4, 2009
Revolutionary Road
A sad story...
Kate and Leo are just the best pair! They made it so much more perfect!
Everyone wants out.
Everyone wants in.
Everyone wants to want.
To want nothing is to have everything!
This movie made my honey and me cry, especially we watched it together when we're suffering bad things! There's a moment in the life of any human be that we stop and ask ourself if we're in the right road, with right person. Insatisfaction???!!! We got it from this one - Revolutionary Road.
Thursday, December 3, 2009
FIX Learning Notes (3)
1. interesting to know that we don't support msg with OrdStatus = New (we only care about executions, not orders)... Apparently this only applies to us, not part of FIX protocol.
2. OrdStatus, ExecType, ExecTransType
Perl Points
1- single quotes & double quotes:
single quotation doesn't interpret, while double quotation does.
Friday, November 27, 2009
一些宏观层面上的经济学原理
1、各大中央银行已经说得清清楚楚:他们就是要尽可能增加货币供应,促成纸币贬值,帮助负债者。
-- for this point, there's no need to talk about China (we have plenty of Chinese newspapers on it). Just look at today's Bloomberg post on Japan - BOJ to Provide 10 Trillion Yen in Emergency Credit. The Bank of Japan said it’s ready to pump more money into the financial system after unveiling a 10 trillion yen ($115 billion) program to help an economy battered by falling prices and the yen’s surge to a 14-year high. Yen is gaining against USD in the past six months, once peaked at almost 84...
Thursday, November 26, 2009
FIX Learning Notes (2)
1. Symbol - Tag 55
ticker symbol
2. SecurityType - Tag 167
sample values: CS, FUT, OPT, WAR etc
3. IDSource - Tag 22 (symbol type)
sample values: 1-cusip, 2-sedol, 3-quik, 4-isin, 5-RIC, 8-exchange symbol etc
4. some other config's
Wednesday, November 25, 2009
RIC Futures & Options Name Convention
1. Reuters monthly codes for futures
my %futureCode = (
"01" => "F",
"02" => "G",
"03" => "H",
"04" => "J",
"05" => "K",
"06" => "M",
"07" => "N",
"08" => "Q",
"09" => "U",
"10" => "V",
"11" => "X",
"12" => "Z",
);
2. Reuters monthly codes for options
my %optionCode = (
P => { # codes for put option
"01" => "M",
"02" => "N",
"03" => "O",
"04" => "P",
"05" => "Q",
"06" => "R",
"07" => "S",
"08" => "T",
"09" => "U",
"10" => "V",
"11" => "W",
"12" => "X",
},
C => { # call option
"01" => "A",
"02" => "B",
"03" => "C",
"04" => "D",
"05" => "E",
"06" => "F",
"07" => "G",
"08" => "H",
"09" => "I",
"10" => "J",
"11" => "K",
"12" => "L",
},
);
3. for Options -- market symbol = security root + strike + option code shown above + expiry year (only one digit)
4. for futures -- market symbol = security root + future code shown above + expiry year (only one digit)
5. examples,
RIO2300X9.L - RIO.L O 20091218 2300.00 AP (RIO.L 2300 Put 20091218)
CBRY800L9.L - CBRY.L O 20091218 800.00 AC
Thursday, November 19, 2009
awk & nawk
1. nawk -F'\t' '$4==1 {print $5"\t"$1"\t"$2"\t"$3"\tYes"}; $4==0 {print $5"\t"$1"\t"$2"\t"$3"\tNO"}' xxxxx
2. grep xxxx XXXX | awk '$2 == 1 { ++total }; END {print "total = ", total} '
Subscribe to:
Posts (Atom)