%%#1sustainable value-add(#1reliable career path):hands-on dev

see also letter to German (post)

Hands-on development, analysis, design, debugging, maintenance, prod support … I get things done. My job interview performance is even better than project performance.

I can do this till age 65, even though my memory will decline.

This is a typical white-collar job, knowledge intensive, and pays “reasonably well” in SG or China but “very well” in US and Europe.

All other roles I am less confident about, including management, Business Analyst, quant research, DBA, data analytics.

Given this #1 thingy, my future belongs to the US.

In SG, at age 50 if I’m given a programming job along with some 20-somethings, I’m likely to be more competent than them, but as Miao and Xiao An pointed out hiring managers may not give me a chance. The Singapore government won’t help me find a high-paying programming job.

Advertisements

[15]where in c++am I growing – GTD^IV

Short and sharp answers preferred
Q: where and how fast am I growing in c++ IV?
A: EPI300/Google style coding test, esp with STL, shared_ptr etc
A: the HFT interviews revealed my weaknesses in some areas.
Q: where and how fast am I growing in c++ zbs
A: [[safe c++]]
A: [[21st century C]]
A: Learnt to question what low level details are more than academic
A: Learnt the practical value of c++ integration with excel, python etc
A: Learnt a bit more about instrumentation including debuggers, esp. on Windows
A: Learnt a bit more about boost smart pointers. There are many of them, because there exists different needs.
A: Learnt a bit more about IDE
A: make, cmake and friends

dummy’s PCP intro: replicating portf@expiry=>pre-expiry

To use PCP in interview problem solving, we need to remember this important rule.
If you don’t want to analyze terminal values, and instead decide to analyze pre-expiry valuations, you may have difficulty.
The right way to derive and internalize PCP is to start with terminal payoff analysis. Identify the 2 replicating portfolios, and apply the basic principle that “if 2 portfolios have equal values at expiry, then any time before expiry, they must have equal value, otherwise arbitrage”.

earning/paying the "roll" in FX swap

Tony gave an example of sell/buy NZDUSD.    NZD is high yielder and kind of inflationary. Therefore, far rate is Lower. We sell high buy low, thereby Earning the swap points.

Buy/Sell USDJPY is another example. USD is high yield, and inflationary, so far rate is Lower. We buy high, sell low, therefore paying the swap points.

## types of Work to slow/speed brain aging

This is an important topic for the researchers. As laymen, I will just reflect on my personal experience — looki.

What kind of activity is considered “work”? I feel it’s the responsibility or commitment, obligation, consequences …

Most but not all the “work” is tiring. I feel creative work can help keep the brain young.

IT — Learning a new tech in body-building mode doesn’t feel tiring to me, but how about to XR?
IT — A big chunk of everyday IT work (including troubleshooting) is partly creative and investigative. Can be brain-boosting.
Kids doing homework – can be tiring but at their age it won’t speed brain aging. How about adults?

paradox – FX homework#thanks to Brett Zhang

label – math intuitive

 

Q7) An investor is long a USD put / JPY call struck at 110.00 with a notional of USD 100 million. The current spot rate is 95.00. The investor decides to sell the option to a dealer, a US-based bank, on day before maturity. What is the FX delta hedge the dealer must put on against this option?

a) Buy USD 100 million

b) Buy USD 116 million

c) Buy USD 105 million

d) Buy USD 110 million

 

Analysis: The dealer has the USD-put JPY-call. Suppose the dealer has USD 100M. Let’s see if a 1 pip change will give the (desired) $0 effect.

 

at 95.00

at 95.01, after the 1 pip change

pnl

value (in yen) of the option is same as value of a cash position

(110-95)x 100M = ¥1,500M

(110-95.01) x 100M = ¥1,499M

loss of ¥1M

value (in yen) of the USD cash

95 x 100M = ¥9,500M

95.01 x 100M = ¥9,501M

gain of ¥1M

value of Portfolio

 

 

0

Therefore Answer a) seems to work well.

 

Next, look at it another way. The dealer has the USD-put JPY-call struck at JPYUSD=0.0090909. Suppose the dealer is short 11,000M yen (same as long USD 115.789M). Let’s see if a 1 pip change will give the (desired) $0 effect.

 

at 95.00 i.e. JPYUSD=0.010526

at 95.01 i.e. JPYUSD=0.0105252, after the 1 pip change

pnl

value (in USD) of the option is

same as value of a cash position

(0.010526-0.009090)*11000M =

$15.78947M (or ¥1500M, same as table above)

(0.0105252-0.009090)*11000M=

$15.77729M (or ¥1498.842M)

loss of $0.012187M

 

value (in USD) of the short

11,000M JPY position

-0.010526 * 11000M= -$115.789M

-0.0105252*11000M = -$115.777M

 

gain of

$0.012187M (or ¥1.1578M)

value of Portfolio

 

 

0

Therefore Answer b) seems to work well.

 

My explanation of the paradox – the deep ITM option on the last day acts like a cash position, but the position size differs depending on your perspective. To make things obvious, suppose the strike is set at 700 (rather than 110).

1) The USD-based dealer sees a (gigantic) ¥70,000M cash position;

2) the JPY-based dealer sees a $100M cash position, but each “super” dollar here is worth not 95 yen, but 700 yen!

 

Therefore, for deep ITM positions like this, only ONE of the perspectives makes sense – I would pick the bigger notional, since the lower notional needs to “upsized” due to the depth of ITM.

 

From: Brett Zhang

Sent: Monday, April 27, 2015 10:54 AM
To: Bin TAN (Victor)
Subject: Re: delta hedging – Hw4 Q7

 

You need to understand which currency you need to hold to hedge..

 

First note that the option is so deeply in the money it is essentially a forward contract, meaning its delta is very close to -1 (with a minus sign since the option is a put). It may have been tempting to answer a), but USD 100 million would be a proper hedge from a JPY-based viewpoint, not the USD-based viewpoint. (Remember that option and forward payoffs are not linear when seen from the foreign currency viewpoint.)

 

To understand the USD-based viewpoint we could express the option in terms of JPYUSD rates. The option is a JPY call USD put with JPY notional of JPY 11,000 million. As observed before it is deeply in the money, so delta is close to 1 (positive now since the option is a call). The appropriate delta hedge would be selling JPY 11,000 million. Using the spot rate, this would be buying USD 11,000/95 million = USD 116 million. 

 

On Sat, Apr 25, 2015 at 2:21 AM, Bin TAN (Victor) wrote:

Hi Brett,


Delta hedging means holding a smaller quantity of the underlier, smaller than the notional amount, never higher than the notional.

This question has 4 answers all bigger than notional?!

Victor

 

fwd-starting fx swap points

Q: If 9M outright fwd point is 15.2 pips, and 3M is 5 pips, what would be the fwd-starting swap point?

A: The swap point would be 15.2 – 5 = 10.2 pips.
 

The fwd point for a 3Mo (our near date) is F – S = S (1 + R * 90/360)/(1 + r * 90/360) – S, which already considers the 3Mo length.

This formula shows the
* near date fwd point number is linear with (R – r).
* far date fwd point number is linear with (R – r).

However, the linear factors in these 2 cases are Different so it’s completely wrong to subtract like 12 – 5 basis points. Swap point reflects not only the IR differential, but also the “distance” and the spot level.

The swap points are smaller when the distance is short.

Suppose you as market take has an existing 3M fwd position and need to roll it forward. You effectively need to close the position for the original maturity and redo it at 9M. That’s 2 transactions with 2 dealers — unwise. Instead, You should go to one dealer to get a fwd-starting swap quote in bid/ask, without revealing your direction. The dealer would charge bid/ask only on the far leg, not twice on near leg and far leg.
Specifically, If there’s a bid/ask on the 3M fwd point (1.2 pip for eg), that doesn’t increase the swap point bid/ask spread, which would be the same bid/ask spread as the far leg fwd points.

x-ccy basis swap – FX homework3 revelations

For x-ccy fixed/fixed IRS, There are 2 levels of learning
11) the basic cash flows; how this differs from IRS and FX swap …This proves to be more confusing than expected, and harder to get right. Need full-blown examples like course handout from Trac consultant. It’s frustrating to re-learn this over and over. May need to work out an example or self-quiz.
22) the underlying link to x-ccy basis swap
———–
A1b: Either issue EUR fixed bond or USD fixed then somehow swap to EUR
A1: fixed USD
A4: euro. Yes. They can simply convert the USD fund raised, in a detachable spot transaction. This is fully detachable so not part of the currency swap at all.
A9: 0 point. Rate is the trade date spot
A2 no

11) Self-quiz on the Trac illustration, to go thin->thick->thin and develop intuition.
Q1: before the deal, is Microsoft already an issuer of fixed or floating bond? What currency?
Q1b: Before issuing any debt whatsoever, what are Microsoft’s funding choices?
Q2: Is there any principal exchanged on near date (i.e. shortly after trade date)?
Q3: Microsoft is immune to FX movement or USD rate movement or EUR rate movement? What is Microsoft betting on?
Q4: Microsoft needs funding in what currency? Are they getting that from the deal?
Q9 (confusing): how is this diff from FX swap? How is swap point calculated?

My mistake in this homework was forgetting that the far-date FX rate used to exchange the principal amount is the rate pre-determined on trade date, written into the contract, and not subject to FX movement up thereafter.

22) I now think the x-ccy basis swap spread is important to any x-ccy IRS aka “currency swap”, because a x-ccy basis swap is an implicit part and parcel of it….

http://quantfather.com/messageview.cfm?catid=8&threadid=75575 points that usd/aud [1] basis swap of 15 bp is interpreted as

“usd libor flat -vs- aud default floating rate + 15 bp, with tenor basis spread adjusted [2].”

[1] or aud/usd…. It doesn’t matter.
[2] in aud case, the default swap coupon tenor is same as USD and needs no adjustment

I guess the spread is positive because aud is a high yielder? Not sure

–The coca cola bond in http://www.reuters.com/article/2015/02/27/coca-cola-bonds-idUSL5N0W127E20150227
US issuers (needing usd eventually) of eur floating bonds [3] would use x-ccy basis swap to convert the euribor liability to a “usd libor + 33” liability, so the negative and growing spread (-33 now) hurts.

Warning — it’s incorrect to think “ok for this quarter my euribor liability is 2% for this quarter, so 2% – 33 bps = 1.67% and I swap it to a usd libor liability, so the bigger that negative spread, the lower my usd libor liability — great!” Wrong. The meaning of -33 is

“paying euribor floating rate (2% this quarter), I can find market makers to help me convert it into paying a usd libor+33”
“paying 2% – 33 bps on a euribor floating bond, I can convert it into paying a usd libor + 0 floating bond”

[3] fixed bond can be swapped to floating
http://www.global-derivatives.com/forum/index.php?topic=444.0;wap2 explains
There is more demand for funding in one currency and more supply in another currency. For instance many Japanese banks have funding sources in JPY but have committments in USD. They therefore will swap their JPY (inflow) to USD (inflow) to cover their USD commitments. The basis swap spread reflects this supply and demand situation.

Assuming a tiny bid/ask spread, I believe a Japanese bank is equally willing to receive
– a stream of usd libor or
– a stream of jpy libor – 10 bps

By the no-arbitrage pricing principle, two floating rates should trade at par and the basis spread should be zero (Tony also covered this point in the 3rd lecture), but there’s more demand for usd libor inflow.

Similarly, after GFC, European banks need usd more than US banks need euro. see http://www.business.uwa.edu.au/__data/assets/pdf_file/0008/2198339/Chang-Yang-UTS.pdf. A typical bank would be indifferent to receiving
– a stream of usd libor or
– a stream of euribor – 34 bp

https://doc.research-and-analytics.csfb.com/docView?language=ENG&format=PDF&source_id=csplusresearchcp&document_id=1014795411&serialid=mW557HA4UbeT5Mrww553YSwfqEwZsxUA4zqNSkp5JUg%3D explains that

the basis swap markets saw increased demand to receive USD funds in exchange for EUR. This excess demand drove the EURUSD basis swap spreads down to highly negative levels as counterparties were willing to receive lower interest payments in return for US dollar funds

aging memory for a developer … is an attitude

I noticed my colleagues (typically a few years younger) are faster at code reading. I seem to remember less and forget more than them. Also I’m possibly slower at solving problems in my projects…

Many more small tidbits of anecdotal evidence all seem to point to the same explanation — an aging developer.

My dad had really good memory until age … 70? His work requires him to read lots of research papers and books, and remember lots of details. After he turned 70 (or 75?) he told me a few times that his memory had become less sharp.

There are many types of memory capabilities like forgetfulness, reading and learning, short term vs long term memory .. The important memory task for a developer includes things like
* solution we tried a while ago —- for a recurring problem at work. An effective or ineffective solution
* handy tricks and how-to’s —- in a language, on an IDE, on the command line, in an OS etc. A bit similar to spelling for Chinese – I used to write and remember them well.
* important details in my own code —- I often forget them, including code I debugged or struggled with
* where to find some useful info —- If you found it once only a while back, you may not remember it and may not bother to write down the steps.
* who said what during a meeting between departments —- The numerous “less important” details are often skipped in the meeting minutes, if any.
* explanation given by some colleague verbally —- I often forget, so I often ask again — annoying:( Most of the verbal explanations I get are not 100% fully understood, not as clearly explained in an email.
* verbal answers I give to other people — I often forget what I said — embarrassing:(
* jargon terms used at work —- including the large number of standard procedures associated with the jargon
* all the details needed for a tech interview.
* past IV questions and answers

(I’m also becoming more forgetful at home — a different story.)

I won’t try and give a well-defined list of these memory tasks. What I really want to say is, active learning delays aging. Challenging ourselves to learn new things, beyond our comfort zone (familiar territories like Java and SQL) stretches our “memory muscle” and keep it in better condition. Memory is like a muscle – the more we use it the stronger it gets.

We first need to believe in our memory capacity, while recognizing all the negative evidence.