Tuesday, December 5, 2017

Thesis on Digital Currency

Here is my master degree thesis on Bitcoin. The topic is :

THE RISK PERCEPTIONS AND TECHNOLOGY ADOPTIONS OF E­-COMMERCE USERS
TOWARDS DIGITAL CURRENCY

It is on google drive at the link below :
click at thesis link

Wednesday, August 2, 2017

Game Theory

Basic Concepts of Game Theory
Motivating Example
Location Game: setting shop on a beach

On a linear beach, there are two vendors, they charge the same price. Where should the vendors locate their shops?
- in the center, near each other

what if there are three vendors?
- 3 vendors at the same spot, each get 1/3, one vendor moves, it gets more profit
- 3 vendors different positions, one vendor moves to center, it gets more profit
- no equilibrium

Information
Mutual Knowledge vs Common Knowledge
Mutual Knowledge: all players know A
Common Knowledge: everyone knows that everyone knows A

Perfect Information vs Imperfect Information
Perfect Information: the player knows the full history of the game so far
Imperfect Information:  the player does not know parts of the history of the game, such as sealed bid auction

Complete Information vs Incomplete Information
Complete Informatio: the player knows the type of other players and rules of the game
Incomplete Information: the incumbent does not know the true type of entrants

Perfect but Incomplete Information Game
- Price negotiation over used car at a dealer shop

Action vs Strategy
Bill has 5 actions and 6 strategies

Normal Form Game (Strategic Form Game)
- simultaneous game
- static setting
- represented by game matrix

Prisoner's Dilemma Game

      |     C          D
---------------------------
C   | -8, -8     -2, -15
D   | -15, -2   -3, -3

conditions
- each player has dominant strategy
- dominant strategy equilibrium (-8,-8) worse than optimal choice, dominant strategy equilibrium should be pareto inefficient to at least some other outcome (-3,-3)

how to escape from prisoner's dilemma
- price leadership
- price signaling
- focal points
- info agglomeration: online price agglomeration could intensify or mitigate price wars. However, you lower the price, competitor can see it immediately, and copy the rpice, so it is not worth it to lower the price.
- commitment

strictly dominant strategy
u(si, s-i) > u(si, s-i) for all si
weakly dominant strategy
u(si, s-i) >= u(si, s-i) for all si   and
u(si, s-i) > u(si, s-i) for some si

Iterated Dominance Equilibrium
- dominated strategy, strategies that will not be played
- eliminate strictly dominated strategy
- eliminate weakly dominated strategy, iterated weak dominance is not robust

Maximin Strategy Equilibrium
- choose the strategy that gives you a max payoff among the min payoff from each strategy

      |       L          R                  payoff
---------------------------
T   |    10, 4     8, 15                 8
B   | -100, 5   20, 10               -100
payoff     4        10

Nash Equilibrium
(x*, y*) is a NE if
- x* is best choice given 2's choice of y*
- y* is best choice given 1's choice of x*

coordination game
      |    S         R
---------------------------
S   | 5, 5     0, 1
R   | 1, 0    1, 1

anti-coordination game
      |    S            R
---------------------------
S   | -5,- 5     10, 20
R   | 20, 10    -3, -3

if multiple NEs:
1. use focal points
- cultural convention
- social convention
- common perception

2. use risk dominance
if (v>=1),(v>=1) at least one of them is strict inequality, then (S,S) payoff dominate (R,R)
      |    S       R
---------------------------
S   |  v,v     0, 1
R   | 1, 0    1, 1
(v-1) > (1-0)
(S,S) risk dominate (R,R)

Mixed Strategy Nash Equilibrium
- assign probabilities to pure strategies
                                 F
                |   DL (q)     CC (1-q)    if Nadal choose
   -------------------------------
  (p) DL   |  50,50       80, 20          DL with prob p
N ------------------------------
(1-p) CC  |  90,10 .     20,80          CC with prob 1-p
                                                   so Federer payoff is
if Federer chooses                   50p + 10(1-p) = 20p +80(1-p) => p=0.7
DL with prob q                         if p> 0.7, q = 1
CC with prob 1-q                         p < 0.7 , q =0
so Nadal's payoff is                    p=0.7 , indiff over q
50q + 80(1-q) = 90q + 20(1-q)
    q = 0.6
if q<0.6, p =1
  q > 0.6, p = 0
  q = 0.6, indifference over p

NE (p*, 1-p*) = (0.7, 0.3)
      (q*, 1-q*) = (0.6, 0.4)
implications of mixed strategy NE
- each player should mix his pure strategy so that the other player is indifferent among all his pure strategy
 choose (p,1-p) so that UDL = UCC
 choose (q,1-q) so that UDL = UCC
- assign zero prob to dominated pure strategy
- randomise just right, avoid outguessed by opponent
- each player mix his pure strategies so that the other player is indifferent among all his pure strategies

Oligopoly Games
                       |   compete on quantity      compete on price
------------------------------------------------------------------------
simultaneous  |     Cournot                          Bertrand
(static)            |
                       |    Cournot-                         Bertrand-
sequential       |  Stackelberg                      Stackelberg
substitute: q1 up -> q2 down
collusion outcome less than NE outcome

Application of simultaneous games
Tragedy of the commons
horizontal axis: % of car commuters
vertical axis: payoff for commuters
NE : (q, 1-q) 
- q% commute in cars and (1-q)% in busses
still not socially efficient
- all commuting by busses is still Pareto efficient

Sequential Games (Extensive Form Game)
- dynamic setting
- backward induction: for finite dynamic games, start from last stage of the game, not for infinite game
- subgame perfect NE: rule out NE of non credible threat, for finite and infinite game

Sequential Bargaining
𝛿 > 50% , first mover adv              ; agreement reached in first round of bargaining
𝛿 < 50%,  second mover adv
0< 𝛿 <100%,  𝛿 is time value

Subgame Perfect Equilibrium
Example 1
SPNE outcome (0, 4)
SPNE strategy:
If B choose R, A will choose (5, -1), so B will choose L, but A will not choose R, A choose L, B choose R, so (0,4) is SPNE outcome.
Strategic Moves
To solve empty promise problem, make 5 worse than 4, cut (5,-1) branch, make 4 better than 5

Example 2
In game theory, having fewer option may be better, because you can manipulate the other player's choices so that outcome is better for you.

Strategic Moves
to influence opponents expectation about your action
to get around prisoner' dilemma
introduced by Thomas Schelling
- cross shareholding
- MFC clause (mutual adoption, 2 period model)
- price matching guarantee policy (mutual adoption)
- entry deterrence:
   -- side payment, merge, build a reputation, invest in extra capacity

chicken game
- two gangsters race their cars toward each other , the first one to chicken out loses.

G                   Gang B
a        | Straight          Avoid
n   --------------------------------
g   S   | -100,- 100      10, -2
A   A   | -2, 10               0, 0

- you don't know how to secure the equilibrium that is favorable to you, because they are two NE
- so you use strategic moves to gain advantage
- commitment, play aggressively, scare your opponents

Entry deterrence
- incumbent facing a potential entrant
- entrant moves first, incumbent moves later
- the latter can behave strategically to deter the entry

I                   Entrant
n        | Enter          Stay out
c    --------------------------------
u    E   | 100,20      200, 0
m   S   |  70, -10      130, 0
bent

the NE is (100,20), it is incumbent dominant strategy, but potential entrant will enter

a few options:
- side payment, illegal?
- marge, anti-competitive ?
- build a reputation for being irrational, manipulate rivals choices to your advantage
(incumbent can increase 70 to > 100, or decrease 100 to be < 70)











the SPNE is (100,20)





in chicken game, sequential game, use strategic moves to show commitment and gain advantage

Fudenberg Tirole Taxanomy

Your
rival's
actions
Your firm commitment


Tough soft
Strategic complement You commit tough, your rival tough too
(puppy dog)
You commit soft
your rival soft too
(fat cat)
Strategic substitutes You commit tough, your rival soft
(top dog)
You commit soft
your rival tough
(lean & hungry look)


How to apply
step 1: calculate your profit as a function of what the other players might do
 πyou = f(others actions)
step 2: guess your competitor's profits as a function of what you might do
 πothers = f(your actions)
step 3: can legally cooperate?
if yes, use cooperative game theory
if no, use non-cooperative game theory
step 4: create the game's payoff
step 5: pick the game strategies
step 6:strategic moves
step 7: make the moves

(to be continued.)


Monday, July 24, 2017

Leverage and Cost of Capital

Leverage
- the effects that fixed costs have on the returns that shareholders earn
- magnify returns and risks

Operating leverage
- relationship between sales revenue and EBIT

Financial leverage
- relationship between EBIT and EPS

Total leverage
- relationship between sales revenue and EPS

operating leverage and financial leverage influence a firm's beta

breakeven point = fixed costs / contribution margin
                             = fixed costs / (price - variable costs)

When contribution margin (CM) is higher, profit rises faster
The higher the fixed costs, and low variable cost, the higher the beta

Operating leverage
- comes from mix of fixed and variable cost




if sales up by 10%

Lite heavy Lite heavy
sales volume 10000 10000 11000 11000
price 1000 1000 1000 1000
total revenue 10000000 10000000 11000000 11000000
fixed cost 5000000 2000000 5000000 2000000
variable cost
(per unit)
400 700 400 700
total cost 9000000 9000000 9400000 9700000
EBIT 1000000 1000000 1600000 1300000
Degree of Operating leverage = %ΔEBIT / %ΔSales

if sales up by 10%,
DOL of Lite = 60%/10% = 6
DOL of heavy = 30%/10% = 3
- more fixed cost , DOL increases

if DOL > 1, the firm has operating leverage

Financial leverage
- comes from use of debt



Unlevered levered
debt 0 10000
equity 20000 10000
asset 20000 20000
tax rate 0.4 0.4
interest rate 0.12 0.12
EBIT 3000 3000
interest(12%) 0 1200
EBT 3000 1800
tax 1200 720
NI 1800 1080
ROE 9% 11%
- more EBIT goes to investors in levered firm (as in NI + interest)
- for financially leveraged firm, NI is lower, but equity base is lower too, so ROE is higher

Basic Earning Power
BEP = EBIT/total assets
- BEP is not affected by financial leverage, because EBIT is the same whether you borrow or not
- BEP is affected by operating leverage, because change in EBIT is affected by DOL

Implications
- for leverage to be positive (increase ROE), BEP must be > rd
- for firms with high profit , use more debt, to shield the profit using debt (tax shield)

Sunday, July 23, 2017

Financial Derivatives

Forward and Futures

pricing:
F(t, T) = S(t) e ^ (r + u - d -y) (T-t)
where T: expiration date
r : risk free rate
u : storage cost
d : dividend yield
y : convenience yield

OTC central clearing to lower counterparty risk, such as London clearing house (LCH)

futures contracts are settled by cash settlement
futures contracts are closed  by entering into an offsetting position relative to your original position

Interest Rate Forward

notation:
2f1 - 1 year from now, 6 month rate
14f6 - 7 year from now, 3 year rate

By the principle of no arbitrage,
 (1+r1/2)(1+1f1 /2) = (1+r2/2)2, solve for 1f1
r1: 6 month spot
r2: 1 year spot

Interest Rate Swap

interest rate is implied in swap
USD/THB spot
USD LIBOR
# of days
swap point = fwd - spot
Σ PV (fixed) = Σ PV(floating)

money market rate, and bond rate affect swap rate

bank use PV01 to calculate risk
if gap > threshold, bank charge more

DV01 or PVBP
- 30 yr bond with 5.5% coupon
at yield of 5.5%, price = 100
at yield of 5.51%, price = 99.8540
DV01 = 0.146% of par
or DV01(per $1 mm par) = $1460

** take note **
- PV01 is change in market value from bumping the coupon rate by 1 bp
- DV01 is the change in market value for a 1 bp parallel shift of the yield curve

**hedge bond investment with bond futures
- use DV01
DV01 of 6 year bond with coupon of 5.5%: 712.5 per $1million par value
DV01 of 6 year bond with coupon of 5.0%: 613.1 per $1million par value
- the hedge ratio  (futures contract to sell) of 6 year bond investment against interest rate risk is
  hedge ratio = 712.5/613.1

Cross Currency Swap

- agreement between two parties to exchange principal and interest payments in two currencies over specified period
- may have or my not have initial principal exchange
- interest payments are usually not netted

basis swap (floating vs floating)

FX Forward

EUR/USD  ; ieur < iusd
EUR/USD forward, EUR appreciate
=> swap point +ve
=> EUR/USD > spot

AUD/USD  ; iaud > iusd
AUD/USD forward, AUD depreciate

=> swap point -ve
=> AUD/USD < spot

Case study:
Delox imports machine from Japan. Its revenue is in EUR, while its expense is in JPY. It expects to pay JPY 1000 million in 6 months. How to manage its FX risk?
Ans: one way is to buy JPY forward
EURJPY spot rate 129.45
6 month EURJPY forward rate 128.26
forward: bank charge bid offer spread
swap: bank will not charge bid offer spread


Friday, July 21, 2017

Financial Options

Options

components of option price
m.v of option = time premium + intrinsic value
intrinsic value: the difference of m.v of underlying and strike price of call option

Minimum value of call
American call : Ca(S0, T, X) >= max(0, S0 - X)
European call : Ce(S0, T, X) >= max(0, S0 - X(1+r)-T)

Minimum value of put
American put : max(0, X - S0 )
European put : max(0, X(1+r)-T - S0 )

Ca(S0, T, X) > Ce(S0, T, X) 
but prior to expiration, S0 - X(1+r)-T > S0 - X

early exercise?
- for call , if dividend > time premium, then you exercise the call option
- for put , if interest rat is large enough

Maximum value of put
American put : X
European put: X(1+r)-T

Put call parity

S= C(S0, T, X) - P(S0, T, X) + X/(1 + r )

ATM european call or ATM european put, which one has higher price?
S = c - p + pv(x)
c - p = S - pv(x)   ;   S=X for ATM option
c - p =  S - pv(S)  ;  S - pv(S) > 0
So : c > p

Put call forward parity
S= C(S0, T, X) - P(S0, T, X) + X/(1 + r )
F = S0(1+r)
S= F/(1+r)
So : F/(1+r)  = C(S0, T, X) - P(S0, T, X) + X/(1 + r )
  P(S0, T, X) = C(S0, T, X) + (X-F)/(1+r)

Binomial Model
- discrete time model
- if infinite samples, converges to BSM model
- if interval time getting smaller, converges to BSM model
p = (1+r-d) / (u -d)
c = [ pCu + (1-p)Cd ] / (1+r)
if stock price up by 20%, and down by 10%, then: u = 1.2, d = 0.9
S+ = Su; S- = Sd, find Cu, Cd, then find c

Black Scholes Model
- continuous time model
- assume rf and vol are constant
- no taxes and transaction fee
- assume options are european
- assume stock price is normally distributed
- S, T, X, rf, vol -> find c

calculate implied vol
- work backwards to find it
- C, S, X, T, rf ->BSM model -> find implied vol

volatility smile
- shows implied vol is not consistent
- implied vol depends on exercise price
- violates the constant vol assumption of BSM
Implied vol > forecast vol
- option overvalued
- sell option

selling options, the trade is short volatility. if actual vol is lower than what he priced it at, he makes money

Interest rate Cap
- series of interest rate call options

Interest rate Floor
- series of interest rate put options

Wednesday, July 12, 2017

Macroeconomics (Part 2)

Marshall-Lerner condition

A depreciation has two good effects (substitution of imports , more demand for exports) and one bad effects (imports are more expensive). Marshall-Lerner condition is real depreciation leads to an increase in NX if sum of export and import elasticity is > 1. Initially, the condition is not met, devaluation worsens the trade balance. In the long run, trade balance will improve, it is called the  J curve effect.
PED (x-m) > 1, devaluation improves current account balance.

PED: price elasticity of demand

Mundell-Fleming model

An extension of IS-LM model, the Mundell–Fleming model describes the short-run relationship between an economy's nominal exchange rate, interest rate, and output. It is used in open economy. This model has been used to argue that an economy cannot simultaneously maintain a fixed exchange rate, free capital movement, and an independent monetary policy. This principle is frequently called the "impossible trinity," "unholy trinity," or the "Mundell–Fleming trilemma."

It is also known is IS-LM-BoP model. BoP is (Balance of Payments).
In perfect capital mobility, the BoP curve is horizontal.

In perfect capital mobility and fixed exchange rate, the increase in gov spending (expansionary fiscal policy) forces the central bank to supply more local currency, to keep the interest rate unchanged. At the same interest rate, the output has increased.


In perfect capital mobility and fixed exchange rate, the increase in local currency  (expansionary monetary policy) will drop the exchange rate. It forces the government to buy local currency to maintain fixed exchange rate. This reduces the money supply. This means monetary policy has no effect.

So it is impossible to have fixed exchange rate, perfect capital movement, and independent monetary policy.

Minimum wage policy

Why minimum wage is not good for the country?
If wage > productivity,
1) πe ↑ => P↑
w ↑ => C ↑, Pe ↑
Pe => πe ↑ => P ↑

2) P ↑ => X ↓ & IM ↑ => NX ↓
P ↑ => ε = EP/P* => ε↑ => NX ↓

Purchasing power of currency and Purchasing power parity

The purchasing power of a currency refers to the quantity of the currency required to purchase a unit of a good, or basket of goods and services. Purchasing power is determined by the relative cost of living and inflation rates in different countries.

Purchasing power parity means equalising the purchasing power of two currencies by taking into account these cost of living and inflation differences. The basis of PPP is law of one price. In the absence of transportation and other transaction costs, competitive markets will make the price of an identical good the same in two countries, expressed in the same currency.

For example, a particular TV set that sells for 400Rp in India should cost 800Rp in Pakistan if the exchange rate between India and Pakistan is 2 Pak/India. If the price of the TV in Pakistan was only 700 Rp, consumers in India would prefer buying the TV set in Pakistan. If this process (called "arbitrage") is carried out at a large scale, the India consumers buying Pakistan goods will bid up the value of the Pakistan Dollar, thus making Pak goods more costly to them. This process continues until the goods are again the same price.

For example again, if we convert GDP in China to US dollars using market exchange rates, relative purchasing power is not taken into account. By adjusting rates to take into account local purchasing power differences, known as PPP adjusted exchange rates, international comparisons are more valid.

Money illusions and Money neutrality

The illusions of money : people think of money in nominal terms, the nominal value of money is mistaken for its purchasing power.

Neutrality of money : change in stock of money affects nominal variables, such as price, wages, exchange rate, doe not affect real variables, such as employment, GDP, consumption.

Microfoundations in Macroeconomics

It is a macro model that is built up from a formal analysis of the behaviour of individual agents in a consistent way. There may be just a single representative agent, or increasingly heterogeneous agents. So this way of macro analysis will involve lots of optimisation by individual agents, to derive aggregate relationships.

Differences between Micro and Macroeconomics
The difference between micro and macro economics is easy to tell. Microeconomics is the study of economics at an individual, group or company level. Microeconomics focuses on issues that affect individuals and companies. Micro looks at supply and demand and the setting of price level.

Macroeconomics, on the other hand, is the study of a national economy as a whole. Macro studies the GDP and how it is affected by national income, unemployment, growth rate.

Monday, July 10, 2017

Fiscal Policy

Fiscal policy
- automatic stabilizer: tax revenue, unemployment benefit
- discretionary policy

tax revenue is endogenous, sensitive to the state of economy than spending

fiscal policy is planned with horizon larger than monetary policy

fiscal consolidation may increase AD, eg. expansionry fiscal contraction
- people expect lower debt, lower taxes in future
- spending cut, wage cut -> labor cost down, Investment up , profit up
- structure reform complement fiscal contraction

Interaction of fiscal and monetary policy

use stackelberg game to model the interaction of policy makers
C- cooperation , Pareto efficient equilibrium 
OM -monetary leadership, OF -fiscal leadership

Government Budget Deficit

deficitt = rBt-1 + Gt -Tt
where r: real interest rate
    Bt-1: government debt at the end of year t-1

let deficitt = Bt - Bt-1
therefore:
B- Bt-1 = = rBt-1 + Gt -Tt
Bt = (1+r)Bt-1 + (Gt -Tt)

-if government spending is unchanged, a decrease in taxes today will have to be offset by an increase in taxes in the future.
-the longer the government waits to increase taxes, the higher the real interest rate, and higher the increase in future taxes

Debt to GDP Ratio

Bt/Yt = (1+r)Bt-1/Yt + (Gt -Tt)/Yt
after mathematics munipulation:
Bt/Yt - Bt-1/Yt-1 = (r-g)Bt-1/Yt-1 + (Gt -Tt)/Yt
where g: GDP growth rate

How countries reduced their debt ratios
- run budget surplus, (Gt -Tt) < 0
- have low real interest rate and high GDP growth, (r - g) > 0, real interest low can be low or even negative when inflation is high.
- a large part of the decrease in debt ratios was achieved by paying bond holders a negative real interest rate on the bonds

Balanced Budget

- It means Gt = Tt
If economy is good, T up -> G up -> cause overheating

If economy is not good, T down -> G down -> econ could not recover

Therefore, balanced budget is not practical

Ricardian Equivalence

David Ricardo developed a theory about government spending and private spending. When government stimulate demand bu debt financed spending, the people will save money to pat for future tax increases (to be used to pay off the debt).
- So overall demand is unchanged

Cyclically Adjusted Deficits

It is used to indicate whether tax/revenue system is going to create deficit at Yn (output at natural full employment). If it is negative at Yn, deficit is *not* going to go down.
- We never know exact Yn, and Yn changes, so Cyclically Adjusted Deficits is not useful

Money Finance
1. Debt Monetization
Fiscal dominance of monetary policy: Central bank must do what the government tells it to do. Government issues bonds and forces CB to buy. The central bank then pays the government with the money it creates, and the government uses that money to finance its deficit. This process is called debt monetization.

2. Seignorage
The amount of good and services that government can obtain by printing money. The revenue from money creation is called seignorage.

seignorage = ΔH/P = ΔH/H * H/P
seignorage/ Y =  (ΔH/H * H/P ) / Y

If government uses seinorage to finance budget deficit of 10% of GDP, seignorage/ Y = 10%, so ΔH/H = 10% and (H/P)/Y = 1,  the growth rate of nominal money must be 10%.