admin's blog
awk passing in a parameter using solaris / sunos
Submitted by admin on Fri, 02/03/2012 - 14:39
take this file , new_list.csv and you wish to see only column 2 with values 14
Tokyo1,3
Tokyo1,3
Tokyo1,3
Tokyo1,3
Tokyo1,3
Tokyo1,3
Tokyo1,3
LONDON1,14
LONDON2,14
LONDON3,14
LONDON4,14
LONDON5,14
LONDON6,14
PARIS1,14
PARIS2,14
PARIS3,14
count=14
Using Solaris
awk -vcount=$count -F"," ' ( $2 == '"$count"' ) { print $1 }' new_list.csv
outputs these values
LONDON1,14
LONDON2,14
LONDON3,14
LONDON4,14
LONDON5,14
LONDON6,14
PARIS1,14
PARIS2,14
PARIS3,14
Using Linux , use without quotes around the variable count. like below;
7 SQL performance technics
Submitted by admin on Tue, 10/04/2011 - 20:14 1. Don't use UPDATE instead of CASE
This issue is very common, and though it's not hard to spot, many developers often overlook it because using UPDATE has a natural flow that seems logical.
PV & VFC
Submitted by admin on Tue, 03/22/2011 - 08:45| VFC (Value of Future Cash flows) is an estimate of the value of a deal at this moment in time, based on its known or expected future returns and obligations, and given the prevailing market circumstances. |
| PV (Present Value) means the same thing as VFC (except for positions in exchange-traded futures, where the concept of “value” is in any case somewhat tricky). |
| VFC is the term preferred |
Natural logarithm definitions
Submitted by admin on Wed, 01/05/2011 - 11:08Natural logarithm
e is the natural logarithm,
e = 2.718281828.




The Black and Scholes Model
Submitted by admin on Wed, 01/05/2011 - 10:25The Black and Scholes Model:
The Black and Scholes Option Pricing Model didn't appear overnight, in fact, Fisher Black started out working to create a valuation model for stock warrants. This work involved calculating a derivative to measure how the discount rate of a warrant varies with time and stock price. The result of this calculation held a striking resemblance to a well-known heat transfer equation. Soon after this discovery, Myron Scholes joined Black and the result of their work is a startlingly accurate option pricing model. Black and Scholes can't take all credit for their work, in fact their model is actually an improved version of a previous model developed by A. James Boness in his Ph.D. dissertation at the University of Chicago.
Calculating delta - interest rate derivatives
Submitted by admin on Mon, 01/03/2011 - 23:26 EXAMPLE #1: Plain Vanilla Swap The first example uses a $100 million notional vanilla swap paying USD Fixed and receiving USD LIBOR. How to hedge this trade – 5 STEPS TO HEDGING: