collateral: trade booked before confirmation

In collateral system, a margin call requires the counter party to post additional collateral (within a short window like a day). If the collateral is in the form of a bond (or another security), then it’s considered a “trade”. There are often pre-agreed procedures to automatically transfer the bond.

So the IT system actually books the trade automatically, even before the collateral operations team gets to confirm the trade with the counter party. That’s what I heard from an application owner. However, I suspect these bonds could be held in some special account and transferred and confirmed automatically when required. In such a case, the trade booking is kind of straight-through-processing.

I guess the counter-party is often an margin account owner, perhaps hedge funds in a prime brokerage system.

a few sec of model-calibration time means a lot

My quant friend told me that the Hull-white model requires calibration via PDE solver. It can take a few seconds just to price a deal. If a spreadsheet has many deals the computational cost can add p to become non-trivial.

In contrast, the SABR model is much simpler – find a vol and plug it into BS formula.

fwd contract often has negative value, briefly

An option “paper” is a right but not an obligation, so its holder has no obligation, so this paper is always worth a non-negative value.

if the option holder forgets it, she could get automatically exercised or receive the cash-settlement income. No one would go after her.

In contrast, an obligation requires you to fulfill your duty.

A fwd contract to buy some asset (say oil) is an obligation, so the pre-maturity value can be negative or positive. Example – a contract to “buy oil at $3333” but now the price is below $50. Who wants this obligation? This paper is a liability not an asset, so its value is negative.

fwd contract arbitrage concept – less useful

label – fwd deal

The basic relationship (between spot price, fwd contract price, T-maturity bond price..) is intuitive, low-math, quite accessible to the layman, so I decided to really understand it, but failed repeatedly. Now I feel it’s not worth any further effort. It’s not quitting. It’s saving effort.

– interviewers won’t ask this
– real projects won’t deal with it, because the (arbitrage-enforced) precision mathematics simply doesn’t manifest in the real data, perhaps due to bid/ask spread
– Only financial math literature makes extensive use of it

I think this is like the trigonometry or the integration techniques — you seldom need them outside academics.

a few benchmarks in finance #vwap, sharpe…

Investment Performance benchmark – Sharpe
Investment performance benchmark – various indices
Investment performance benchmark – risk free rate
Investment performance benchmark – value benchmark and size benchmark. See the construction

Execution benchmark – vwap. I feel this is the natural, logical benchmark. “Did I sell my 5000 shares at yesterday morning’s average price?”
Execution benchmark (2nd most common) — implementation shortfall (very similar to arrival price). See slippage: several similar meanings

finance model — various meanings, very briefly

I feel a financial model is any math that describes/explains/relates/predicts economic numbers.

A “model” means something different in buy-side than in derivative pricing including complex structured products.

On the buy-side, I feel a model is like a regression formula that Predicts a (single?) dependent variable using several explanatory variables. In simple words, such a model is an alpha model, which is related to a trading strategy.

what-if – (binary) option valuations – develop intuition

as T -> inf

C_0 -> S_0

P_0 -> 0.0

binary Call price ->

binary Put price ->

as t -> T

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as S -> K

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as S -> 0

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as S -> inf

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as R_disc -> inf

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as R_ disc -> 0

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as R_grow -> inf

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as R_grow -> 0

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as K -> inf

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as K -> 0

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as sigma -> inf

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

as sigma -> 0

C_0 ->

P_0 ->

binary Call price ->

binary Put price ->

extreme long-short allocations by MV optimizer

This is stressed over and again in my MV optimization course…


Suppose we have only 2 securities with high correlation.


Often one of them (AA) has a slightly higher Sharpe ratio than the other. The optimizer would go long a few hundred percent (say 300%) on it, and short 200% on the other (BB). These allocation weights add up to 100%.


If we tweak the historical mean return a bit so AA’s Sharpe ratio becomes slightly below BB, then the optimizer would recommend go deep short AA and deep long BB.


This is a common illustration of the over-sensitivity and instability of MV allocation algorithm. In each case, the optimization goal is maximum Sharpe ratio of the portfolio. Why Sharpe? MV


risk premium – dynamic factor models

 See post on static factor models.
A lot of econ theories and asset allocation models produce dynamic estimates of next-period returns. One example is the dividend-yield model, based on dividend-price ratio. If my DP data indicates some stock is going up next year, how would the econs  theory suggest me do?

Mark Hendricks’ HW1 has a (theoretical) example. Not sure how practical it is.

risk premium – static factor models

#1 Assumption – time-invariant equilibrium, iid (or at least slow-changing).
All of the alpha, beta, lambda, steady-state mean/vol of annual returns on every security, correlations, covariance are iid … All the year-to-year changes are attributed to the noisegen, but the noisegen itself is absolutely stable. Just like in natural science.
Even a fund is modeled as a fixed collection of securities, more fixed than any index.
I feel once we wrap our mind around this Fundamental Assumption, everything falls into place. Now the remaining task is to calibrate the alphas, betas, etc, using historical data.
The “value” index is a long-short portfolio of many, many stocks. Think of it as a security, with a higher “intrinsic” level of return and higher “intrinsic” vol than the market. This is a typical high-risk-high-return security. Investors are rewarded for taking on the extra risk. 

Just how much extra return is in this reward? I used to think the reward must be high enough otherwise no investor would want to take on the risk. That would be a supply-demand theory, but I now I feel our Fundamental Assumption implies that the intrinsic volatility/excess return are a reward/cost that’s “precisely” measured and published, so each investor can choose to take it or leave it.

The intrinsic excess return in the steady state represents the excess risk inherent in this “value” portfolio. This portfolio has an “intrinsic” risk premium, i.e. an “intrinsic” excess return. Suppose it’s 12%. If an investor JJ’s portfolio has value-beta 0.5, that means JJ can expect, over the long run, 6% excess return due to this exposure. JJ could also have a size-beta, which would contribute another 4% extra returns.
Hi Victor,
Let me address these in order…
1.)  Yes, lambda is the factor risk premium estimated from historic data.  A risk premium of .11 says that you get an EXTRA return of 11% for every unit of the factor beta which you hold.  You’re right that this estimate is from historic data so we can’t be sure about what the factor premium will be over the next 80 years.  That is why any asset manager would not just use historic data but also their own beliefs and forecasts about the future.
2.)  You’re right that CAPM is the simplest example of a factor model, so it can be very helpful in understanding all the others.
Risk premium = expected excess return.
Risk premium of a factor (lambda) expected excess return on holding that factor
Beta is a measure of risk.  It tells you how much covariance risk the security has.  There are many betas we could measure, each would tell us about a different type of covariance.
Value beta is a covariance with a portfolio of value stocks, which means stocks with large book valuations compared to stock-market valuations.  (Or large Earnings compared to Stock Prices.)
Size beta is a covariance with a portfolio of small stocks.  
“Size” risk prmium is the expected excess return from holding small stocks.  
The FF factor model says that for each unit of “size” beta a stock has, it will get an extra amount of risk premium, equal to the risk premium of the portfolio of small stocks.
I hope this helps.  For more on the CAPM, see the references in Lectures 3-4 of FINM 367, or really look into any decent book on asset pricing.

SGD exchange rate management by MAS

HK government uses a “pegged FX rate”. The drawback is “imported inflation”. HKD is kept artificially low, so HK living cost is higher.

SG government chose a different strategy – “managed float”. Whenever SGD FX rate exceeds the policy band, MAS would buy/sell SGD in the open market, which cost tax payer’s money.

Due to the impossible trinity (,
– SG government loses the freedom to set independent interest rate. SGD interest rate is forced to follow USD interest rate.
– China has capital control, Fixed exchange rate and Independent interest rate policy.

For YuJia – trade at market close

My strategy assuems we could buy or sell at exactly the daily close price. There’s no bid/ask to worry about.

Although a stock market may close at 4:00 PM, many stocks continue to trade for at least 20 minutes after the close. We wait for the actual close price, and make our trading decision. There are risks to this practice.

* Trading volume typically plummets when the market closes. This causes market orders to become very risky. Therefore we use limit orders.

* Limit orders may not get filled, therefore we use total daily volume to throttle our trade size.

For YuJia – pair trading details

— volume-sensitive trade sizing —
Given the thin profit margin, the strategy needs to trade large volumes. However, there are 2 upper limits on the trade size. The engine computes both limits and adopt the lower.

1) First limit is market impact. The trading engine has a parameter known as participation rate. It’s set to a value below 1%. If on a thin day ES total daily volume is, say, 4320 contracts, then the engine won’t trade more than 1% of that, otherwise the ensuing market impact would be too large — we risk getting filled at a worse price than planned.

Using the participation rate, the strategy determines how many futures contracts to sell. If that quantity turns out to be 0 then the engine won’t enter the market.

2) The other upper limit is post-trade market risk.

Prior to market entry, if our cash balance is worth, say, 44 futures contracts, then the strategy would trade up to 10x. If we ignore this limit and recklessly trade a gigantic quantity (like 700 x 44 contracts), then over the holding period a ES price surge, magnified by our large position, could wipe out the entire portfolio i.e. unrealized loss exceeding the cash balance. (Note even though our equal-dollar ETF position should in theory hedge our futures position and insulate us from broad market move, the two prices could go out of sync by a significant margin for a short period.)

(In fact, when we ignore this limit, our StopLoss would get hit.)

There’s no separate limit for the ETF trade size. The ETF trade size is always equal to the futures trade size in dollars. For example, if I short 5 futures contracts worth $900 x 5, then I would long 50 ETF shares worth $90 x 50. (Note the ETF unit price is 10% of the Futures contract.)

Using equal dollar value on both the long and short legs provides a nearly perfect hedge against broad market movement. When the overall market moves down (or up), one leg loses $x and the other leg gains $y which is very close to $x. However, as stated earlier, “very close to” doesn’t mean $x = $y, and the difference (x-y) would be magnified by our position size. It could be a very large unrealized loss and could force close the entire account.

— leverage and borrowing cost —
Graph above shows the interest paid on each trade. We only borrow money when we enter the market and immediate stop the borrowing when we exit the market. We basically roll the loan over night. If we hold a position for 9 days, we would pay 9 day’s of interest, no more no less.

The daily interest rate is based on the US Fed Fund rate. We don’t assume to be a top-rated bank, so we pay a 100 bps premium over the FF rate.

Without borrowing, futures contract margin requirement is hard. We start with only $1000 and need to leverage 5 times by borrowing $4000. In a sense, borrowing is needed in the early phase when our initial capital is small.  It’s possible to make do without the loan when our realized profits boost our cash position to beyond $100,000. However, we actually implemented an yearly reset whereby all realized profits are taken out of the trading account, so at start of each year capital is reset to $1000. We always need to borrow $4000.

— dividend collection —
Graph above shows the dividends collected over the years.

The ETF actually generates quarterly dividends. It can be profitable to trade for dividend capture, but it requires market timing and luck. In our strategy, we collect dividend by chance not by design. Benefit is lower risk and extra return, depending how we look at it.

If on a dividend date, we happen to hold the ETF, we would recieve the dividend as a ‘bonus’, which boosts our investment return. Nevertheless we don’t rely on such bonus dividends to enter/exit the market. In other words, the strategy is designed to be robust even with zero dividend each time. A strategy that relies on dividend capture is sensitive and could potentially be hit by unexpected low dividend or adverse price movement, which is a potential risk factor. Our strategy sidesteps those tricky questions because we treat any dividend received as a bonus.

Given the thin margin in our strategy, the bonus dividend income is small but helpful.

— exchange fee (including commission) —
Graph above shows the fees incurred over the years. Given the thin margin in our strategy and the relatively large trade size, exchange fee is rather significant. When commission rate doubles, the profit drops by at least a third.

Higher fees also lead to more stop-loss triggers. Each trigger leads to a major realized loss.

It’s not easy to find exact commission rate. I assume the 2 instruments are very liquid and high-volume, so commission should be lower.

PCP -> div, delta, fwd-contract …

How do we internalize the PCP implications? They are hard to remember, easy to get wrong. We need to know the limitations/assumptions of each “rule of thumb”. Some rules are more fundamental than other rules.

PCP is more fundamental than BS.

PCP is more fundamental than GBM.

PCP equation applies to both 1) terminal values and 2) pre-maturity values. In fact, given 2 replicating portfolios, their values must match at all times. What if one of the securities involved is non-tradable, like a dividend-paying stock? See posts on PCP+dividend.

PCP applies only to European options, not American or binary options.

professional option traders

Professionals sell calls and puts. (Retail investors buys them.). These are “High probability” trades, i.e. high chance of profit. Given this zero-sum game, it follows that the option-buyers do low-probability trades. This isn't a risk-neutral world. Retail is risk-averse.

There are real risks that the option could get exercised, so the option sellers always need some protection.

finance calc ^ accounting calc

I'm trying to understand the relation between the finance perspective and the accounting perspective.

Financial data often fall into 2 categories – accounting data and financial data. For example, I believe live market data (“financial data”) is largely irrelevant to accountants when updating the accounting records.

Accounting calc is strictly by the rule, a bit mechanical; finance calc is flexible and subject to interpretation.

When we hear of accounting, we think of the external (and internal) accounting firms, and financial reporting (yes accountant's job). I feel financial reporting has legal implications. Investors and regulators demand accurate calc. Therefore accounting rules are like laws. Breaking these rules is like breaking the law, falsifying and cheating tax authority and regulators, retail investors, institutional investors.

In my mind, “Finance” as a profession and discipline is about … valuation of corporate and other securities ultimately for transactions. For eg, an investment is a transaction — buying a security.

Finance is at a somewhat higher level than accounting?

attributes of an option instrument

When we say “I am short 30 OTM July IBM put option struck at 103”, we mix static instrument attributes with a non-static attribute

A call option is always a call option (unless in FX). The underlier and the call/put attribute are part of the product static data.
The strike/expiry are also part of the product static data. These are the 4 defining attributes of an option instrument in real
business conversation. It’s important to notice the difference between static and dynamic attributes.

Moneyness (ITM/OTM) is a dynamic attribute. Moneyness is like indebtedness. You can be in-debt now but later become debt-free.

A negative vega position is always negative vega. This characteristic never changes. It’s like a person’s ethnicity. However, this
is not an instrument attribute, but a position attribute. Ditto for the quantity.

securities with negative value

Some securities can have positive/negative values for the holder. I don’t know many asset classes in this category. (If indeed there are only a few, then they must be important). What I know — Fwd/futures contracts. These contracts are fundamental to almost all derivatives.
Most traditional securities (assets?) have a purely positive value – stocks including ETF, (junk) bonds, options, commodities, real estate, MBS…
How about swaps? I think like the fwd contract, the execution price is chosen to give both holders $0 value on trade date. After trade date, either holder can have a “position” with a positive  or negative value.
How about structured products? I guess often falling into this category. Usually between 2 holders – a dealer and an institution.

PCP – 3 basic perspectives

#) 2 portfolio asset values – at expiration  or pre-expiration. This simple view IGNORES premium paid

#) 2 traders' accounts each starting with $100k cash. This angle takes premium into account.

#) current mid-quote prices of the put/call/underlier/futures should reflect PCP, assuming good liquidity. In reality?

sticky delta – bit of clarification says “as the exchange rate moves, the volatility of an option with a given strike is also assumed to move in such a way that the volatility skew, as a function of delta, does not move“. By “skew” I take it to mean curve shape. By “function” I take it to mean a curve with delta as the x-axis.

If you refresh your USD/JPY vol surface every hour, you will see the surface moves.  Let's keep things simple and just focus on the 1-year smile curve. This curve moves but its shape stays fairly constant. It stays constant if you plot (imp) vol against delta. I believe the shape doesn't stay constant if you plot vol against strike. We say FX vol is sticky delta not sticky strike.

nomura FX op system

— Products traded —
vanilla fx options
Barriers options
digital options
multiple barriers
fx option strips
Target Redemption notes (TARN)

— system function —
real time risk,
scenario risk — more flexible,
GUI changes — possibly no one will take it on except you.

Quants give the order.

for YuJia – parameter optimization for the strategy

The SP strategy has 2 parameters to optimize — g and j. Very briefly, we monitor Price(futures) – 10x Price(ETF). When the spread exceeds g (a positive param), then buy the ETF and sell the futures. Remain market-neutral. When the spread drops below j (positive or negative param), we close all position and exit. The goal is to find optimal values of j and g to produce highest return on investment.

The matlab fminsearch and fmincon optimizers could find only local minimum around the initial input values. If our initial values are (j=-1, g=3) then the optimizers would try j values of -0.95, -1.05 and similar values. Even though the optimizer would try dozens of combinations it would not try far-away values like -5 or +5.

Therefore these standard optimizers are limited in their search capabilities. We took inspiration from a sample solution to Homework 3 and came up with our own optimizer — i call it randshock. It’s very fast and fairly stable.

  yellowJersey = 0;
  unbeatenTimes = 0;
  while (unbeatenTimes<unbeatenTimesMax)
      Target = -getMetric(mu);
      if Target > yellowJersey
        yellowJersey = Target;
        mu_yj = mu;
        fprintf(‘! n’);
        unbeatenTimes = unbeatenTimes + 1;
        unbeatenHistory(unbeatenTimes) = Target;
      power = 2*log(5)*rand(1,1)-log(5);
      multiplier = exp(power);
      g = mu_yj(2) * multiplier;
      gap = g * (0.5 + rand);
      j = g – gap;
      mu = [j g];

The entire optimizer is only 20 lines short. Can be easily tested by selecting ENV.MODE_OPTIMIZE. It gives a random “shock” to the input params, and checks out the result, then repeat. If any result is better than ALL previous results, then this result gets the yellow-jersey. We would declare it the final champion only after it survives 1000 random shocks.

The random shock is designed to be big enough to reach far-away values, and sufficiently “local” to cover many many values around the current param values i.e. the current “yellow-jersey”.

Without loss of generality, we will focus on the most important parameter “g”. The shock is implemented as a random multiplier between 0.2 and 5. This means the randshock optimizer has a good chance (1000 tries) to reach a value 80% below the yellow-jersey or 5 times above the yellow-jersey. If all values between these 2 extreme values don’t outperform the yellow jersey, then there’s no point exploring further afield.

Between these 2 extremes, we randomly try 1000 different multipliers. We apply the multipler to the current “g” value. If none of them beats the yellow jersey, then we conclude the optimization.

If any one of the 1000 tries is found to outperform the yellow jersey, then it gets the yellow jersey, and we reset the “unbeatenTimes” counter, and give 1000 random shocks to the new yellow jersey.

In theory this process could continue indefinitely but in practice we always found a champion within 2000 shocks, which takes a few minutes only.

Using the randshock optimizer we found optimal param values, which are the basis of all the analysis on the strategy. Next let us look at the optimal parameter values.

The optimal values are g=6.05 and j= -2.96. ROI = $194k from initial seed capital of $1k. In other words, $1k grew almost 200 times over the InSample period (about 10 years).

Using these two optimized parameter values, the OutSample period (from late 2009 till now) generated a profit of  $7576, from initial seed capital of $1k. The return is not as “fast” as InSample, but still the optimized values are usable and profitable.

##major corp bond ECNs

“credit e-trading” basically means corporate/muni bond ECN trading. “Credit” doesn’t cover CDS in this context.

Major ECNs include
– bloomberg — FIX
– knight – FIX
– the muni center – FIX confirmed
– tradeweb – FIX

Many investment banks translate external FIX messages to in-house FIX format

KDB is used as in-memory DB or cache for “history” only

trade volume/quantity stats

trade size:

20,000,000 shares is not uncommon for a single equity cash or equity swap order.

Biggest ECN markets in retail-friendly credit markets@@

Hi Youwei,

I guess your biggest product types are corporate bonds, muni bonds,
mortgage backed, but not US treasuries, interest swaps nor credit
default swaps?

Looks like Bloomberg is the most popular ECN overall in the FI space?

Is TradeWeb the 2nd most popular?

How about market-axess?

Is ION also an ECN or mostly a data-source/data-storage. I find it
hard to “define” the primary role of ION. I believe it's a first and
foremost a consolidator of market data. Top 5 products supported on
1) Government Bonds,
2) Corporate Bonds,
Emerging markets (I believe mostly credit products),

trade confirm – key points

Keyword: compare — confirms are generated for the purpose of comparing the 2 confirms

Keyword: pre-settle — confirms must be compared before settlement

For a listed derivative, match-maker (exchange etc) sends 2 trade confirms to both buyer/seller, so both side will independently verify the confirms — 3-way confirm.

In OTC, both sides need to exchange confirms as well. Without it, there's real risk of “out trade”. In my bond execution engine, we are one of the 2 sides only (the dealer), so we generate one confirm only. I guess the retail side also generates an independent confirm.

For CDS trades, there are third party post-trade platforms (like Creditex ) to provide this service. The counterparties could execute a trade electronically or over phone, then send execution details to the third party, which matches them up before sending a confirm to each.

2 so-called Prices in a repo contract

The moment 2 parties agree on a repo, they finalize 2 numbers
– The Price is the amount paid for the security at the “opening” leg
– The Rate is the interest to be paid at the “closing” leg

For a common repo, the opening leg is a spot trade, so price is comparable to the market price of the security, but negotiable if it's illiquid.

A repo can also be forward-start. Price would be a forward price.

which "Technology" were relevant to 2010 GS annual report #upstream

(Another blog post. See also the post on Upstream)

Re the GS annual report page about Technology… When yet another market goes electronic, commissions drop, bid/ask spreads drop, profit margins drop, trade volumes increase, competitions intensify. So which IT systems will rise?

market data – tends to explode when a market goes electronic.
* tick data
trade execution including
* order state management
* order matching, order book
real time risk assessment
real time deal pricing
offer/bid price adjustment upon market events
database performance tuning
distributed cache
MOM ie Message-oriented-middleware
multi-processor machines
grid computing

How about back office systems? If volumes escalate, I feel back office systems will need higher capacity but no stringent real time requirements.

On the other hand, what IT systems will shrink, fade away, phase out? Not sure, but overall business user population may drop as system goes low-touch. If that happens, then IT budget for some departments will shrink, even though overall IT budget may rise.

In a nutshell, some systems will rise in prominence, while others fall.

credit risk analysis of collateral valuation

Hi XR,

You told me most of the credit risk analysis is on collateral. I guess a client hands over some bond to BofA as collateral, in order to secure some loan? I know collateral is a very common requirement of many banking deals. One of the most common is a commercial bank loan.

In that case, how often is the collateral revalued? In margin systems, assets in the margin account is revalued daily, and the bank (the lender) could make “margin calls” on a daily basis.

In your case, if a collateral has a reduced valuation (say 50% lower), what does BofA do? Clearly the bank is at risk when the collateral it holds is almost worthless. I believe any serious banker would immediately demand additional collateral. Is there some system that automates the decision making flow? First system must gather the collateral data, then revalues each, then compare with the collateral requirement for each deal. If new valuation is lower than required collateral, then system need to inform the bankers or traders of the exposure, vulnerability and credit risk. How is this done in your case?


reoffer engine: basic questions u r expected to know

Q: why wpf and swing, rather than browser-based?
A: real time updates of every position
A: traders need to switch among the grids without reloading from server. We have a local cache. Separate jvm from swing, and data-binding for wpf.

Q: what if 2 updates come from different sources and both trigger repricing. How does the classic system schedule them?
A: some cache triggers are single-threaded, some are multi-threaded. There's an incrementing version number.

Q: why is PNL updated in real time? isn't EndOfDay enough?
A: nice to have.
A: We only persist EOD pnl data

Q: how does libor or other benchmarks affect pricing?
A: Some positions are priced with a spread on benchmarks

Q: how many traders?
A: about 120

Q: what do the middle office do with your app?
A: faxp
A: they might look at PnL on our Swing app

Q: how many middle office people?
A: Fewer than traders

Q: what other users use our app?
A: Trading floor support

Q: how does our system calculate or use credit risk data?
A: we don't calculate anything using credit risk data
A: each bond has its own yield curve. Typically a spread on Libor. If you are an AAA bond, then your curve might be Libor itself. If you are BBB, then Libor + some spread. The spread depends on your credit rating.

Q: I thought prop traders manage their reoffer pricing using their own algorithm
A: prices maybe
A: marks are sometimes calculated in ARB and fed into Autoreo. Then Autoreo uses those marks for reoffer pricing.

Q: how does our trader hedge?
A: swaps, swaptions, caps/floors, CDS, treasuries, futures, stocks,

Q: What if we send out a wrong (very low) offer price and it's lifted by a buyer? How do we back out?
A: TMC can cancel it for us (so-called long-term “relationship”) , but in most cases, you can't simply cancel a trade simply because you want to change your mind.

Q: in classic, how does one cache trigger update cache in another JVM?
A: async by JMS subscription, and synchronously by RMI. Each cache JVM has a cache port.

Q: how does the swing app get notified when server side gets a new price, benchmark, pin, spread, new trade etc?
A: local cache subscribes to JMS

Q: bid/ask spread indicates liquidity?

listed stock option creation

Let's focus on a call option on a new stock symbol named “TYX”.

There'll be a seller and a buyer of the option. Initially, the option writer is the seller.

Is the exchange the counter party to every seller and every buyer? yes

Does the options exchange always create a buy and sell transactions at the same time? yes

Must a put option be created at the same time? No. Early option exchanges list only calls.

learning topics in options

A few loose “topics” —
a) option valuation at expiration and before
b) PCP
) log normal
) std dev
1) basic long/short positions => strategies like collar, condor, butterfly…
2) volatility and 1)
3) delta (and other greeks) and1)2)
4) hedging with 1)2)3)
) skew
) random variable
) binomial pricing tree

First realize that options are more complex than futures (which is more complex than forward contracts) —

* There are 2 prices — exercise and premium (bid/offer).
* There’s call and put, which are often related.
* option prices are sensitive to (the 3 Greeks)
** vol swings
** underlying asset price swings
** expiration date approaching

Next, focus —

– Focus on OTC. I feel listed options are more complex. Exchange must create a pair and maintain margins.
– Focus on American options. All listed options are American style.
– Focus on stock. Avoid index options as they involve cash settlement. FI options are way too complex. Currency option is also more complex as there’s no clear distinction between what we pay (premium and strike) vs what we get — both are “money”.
– Focus on long positions. Shorts are less intuitive but still important.
– Focus on calls first but soon you must deal with puts

busiest drv markets

Q: Most important types of option contracts?
A: stock options, FX options (mostly OTC, but also on Philly exchange)

Q:Simplest types of option contracts?
A: stock options, clearly simpler than FI options

Q: Most important types of futures contracts?
A: IR futures — including the Bund / Tr futures (long term IR) and (short term IR) eurodollar futures

Q:Simplest types of futures contracts?
A: commodity futures

Q: Most important types of forward contracts?

Q:Simplest types of forward contracts?
A: equity forward

Q: Most important types of swap contracts?
A: IRS, FX swaps

Q:Simplest types of swap contracts?
A: IRS itself. IRS is a distinct type of swap, in a class of its own.

IRS motivation, again

For an issuer to borrow $100M, the floating rate is typically lower than the fixed rate that's available from a regular bond issue.

Some “fixed” bond issuers actually want a floating interest cost, which is typically cheaper. IRS is a simpler route than the VRDO with the remarketing agent and letter of credit.

“Major issuers evaluate the swap market and the bond market side by side” as 2 alternatives.

Cast of characters
* issuer, like IBM
* swap provider, like GS
* investor, like grandma.

commission + seller px == trade px # bond trade

In a bond trade, sales credit is always included in the trade price, the price *buyer* pays, not the net amount seller finally get.

Bond Markets present a simple facade to retail investors. In muni, retail investors tend to be buyers who often hold to maturity. Therefore buyers see a simple, consolidated price.

Seller must give up part of that price to the salesperson as “sales credit”.

Sales credit always *increase* the trade price.

profit margin in equities

* there is Direct Market Access (DMA) – like brokers / trading houses that facilitate equity trades – extremely low margins
* there are block trading venues that facilitate low-impact block trades between buy side vendors – high margins
* then there are various equity derivatives, like options trading and equity swaps – that's another ball game

net revenue, unrealized pnl

For a financial controller overseeing a trading desk, MTD [1] net revenue is the profit or loss of a trading account [2]. One way to compute this number is


  Realized pnl + unrealized pnl [3] – sales force commissions [4] paid out + interest accrued while holding the security


[1] or daily or YTD – just some period

[2] or a group of trading accounts

[3] paper loss or paper profit

[4] aka sales credit

commodities trading sys

* trading sys — oil
* trading sys — base metal
* trading sys — precious metal
* trading sys — futures, options, …
* position calculator
* gateway/exchange
* risk attribution
* matching system
* physical scheduling
* OTC off-exchange commodity contracts

Mostly c# and java. c++ is used when a faster algorithm is needed, when no framework is needed, and in analytics..

bond ref data service – practical caching strategy

Data change frequency is lower than market data. JMS-based cache update.

There's a thin database layer, supported by a dedicated developer — minimal (if any) stored proc. There's a thick java api layer, supported by a team of developers.

To avoid hitting the DB too frequently, there's an in-memory cache, to be updated whenever data changes in the DB. Some places use RV, some use JMS.

UBS IV emerging market credit/rates: java

Q: How do you create a deep copy of a java List where each element could be an Integer, Float …?
A: see the email I sent on 4 Aug 2018.

Q1: how do you price an interest rate swap? I think this can mean at least two things
Q1a: how do you compute the p/l of an existing IRS?
Q1b: how do you determine the fixed rate on a new IRS?

Q: how do you call c from java?

Q: what does a credit spread mean?

Q: Challenges of multithreading?
%%A: one feature of java can restrict the number of threads to a number smaller than the number of processors? Can’t name that feature.

Q: Say a master producer thread puts objects (like tasks or …) into a shared collection, and worker threads pick them up and put results objects into a shared place. How do you ensure data integrity/consistency.

–perl QQ topics — by using python or perl day to day i won’t know these topics 😦

Q: Say your perl program needs to create 15 concurrent child processes.. How do you wait for all children to finish?

Q: How do you connect your (perl) STDIN to a child process?

credit desk — CDS, corp bonds, MBS
rate desk — IRS, treasuries
c++ is used by quants but not really others.

option-related jargon encountered recently

You asked what option-related jargon I learned recently. Here are some
(“vol” and “volatility” intermixed)

greeks of common spread portfolios like straddle, strangle, condor, butterfly… ?

Put-call parity
synthetic put, synthetic call, synthetic long/short underlier. WHY would traders prefer the synthetic forms to the simpler forms?

variance swap? Why is it so popular?
barrier options?

how does dividend announcement affect options
how do people forecast dividends many years into the future?
How is libor curve affect option pricing
forward curve bootstrapping
forward price and how is it estimated
ex-dividend day and how it affects option exercise
repo curve used in option pricing?
dividend blending in forward curve bootstrap?

local volatility?
Historical vol
Realized vol
implied vol
volatility cone

volatility skew — why
volatility smile — why
How is fat tail related to skew/smile
higher moments of the price distribution function

VIX – most important index on options
typical values of VIX values
typical values of stock volatility values

arctan surface – for what underliers
taylor surface – for what underliers

price relative
What is the expected daily price relative for a stock with expected volatility of 20%

vol of ETF, indices and single stocks
vol of currency pairs
vol of interest rates

what applications do option traders need
what market data do option traders need
How up-to-date and live do option traders need their market data to be
How are vol surfaces calibrated, finalized and published
What types of users rely on vol surfaces and why

Greeks represent exposures. Which exposures do traders want to avoid by hedging, and which ones they don’t want to avoid
European/American/Bermuda options
among ATM / ITM / OTM what type of options are most popular and why
log-normal distribution vs normal distribution
How do traders price OTC options from listed option prices
What risks do long-term option contracts create and how to reduce those risks
how many underliers have listed options
wings of the volatility surface
Basic techniques to remove outliers during volatility fitting
cost of vol fitting
basic steps to fit an entire surface from a bunch of option quotes on different expirations and different strikes
precisely when would an option holder want to exercise an option?
assignment process upon option exercise
typical values of delta for ATM options, OTM and ITM options
when would delta exceed 1
option decay
Basically, how is historical vol measured
Can you compare implied vol against historical vol

rule based margin calc + stress test (GS prime brokerage@@)

Start with basic margin calc used in my 1997 investment, or as described in

Then apply rules. Rule-based calculator recognizes known hedge strategies and picks out each pair (or 3-some …) of positions in a hedge. These tend to reduce the margin requirement. Known as margin release??

Lastly, apply stress test to simulate worst cases. One of the worst cases is the worst worst. In the worst worst, price can be 5%  worse then normal, so investor’s margin requirement should increase 5% to cover that.

financial jargon: financing ie capital formation

“in response to a $-seeker, finding $-providers and getting the $ to the receiver.” The return side of the transaction is perhaps(?) supported by other teams

financing means
– getting $ for party A
– getting $ from party B
(Party A is always a client to me. Party B usually is a client too.)

Financing is always(?) a kind of broker job between $-seekers and $–providers. Our firm (the financing team) earns fees from them.

Financing usually involves
– debt, lending.
– equity

“financing a position” means? I think it means finding fund so Party A can take a particular position.

A “financing solution” is a clever deal.

“financing services”

“financing professionals”. Often a person working in the financing business focuses on that business.

financial jargon: trade-date ^ settlement-date

— based on
When it comes to buying *shares*, there are two key dates involved in the transaction. The first date is the trade date, which is simply the date that the order is executed in the market. The second date is the settlement date, at which time the transfer of shares is made between the two parties. It is the settlement date, however, that marks an official transfer of ownership from the seller to the buyer. While there may be differing rules for the various jurisdictions around the world, the general view is that ownership is transferred when the funds are given in exchange for the security, which happens on the settlement date.

— based on

* the date by which a buyer must pay for the securities delivered by the seller.
* Usually between one (T+1) and five (T+5) days after the trade date, depending on the transaction type.
* The settlement date for stocks and bonds is usually three (T+3) business days after the trade was executed. For government securities and options, the settlement date is usually the next (T+1) business day.

financial jargon: function, legal entity

“function” has a specific (but not well-defined) meaning in accounting. I think a function means
– an “account” or
– a “team job duty”
– a team, or an organization

My hypothesis: In some (large) financial firms, one type of “account” might be the responsibility of a (sizeable) business organization, with a well-defined structure.

Financial organizations are often structured around accounts (ie functions), just like engineering organizations are structured around components.

I think a legal entity also means a department among many.