MotivationThe Results
Summary
Optimal Cash Management withDynamic Programming
Performance Measure on the Example ofHungarian Post Co. Ltd
Dániel Havran ∗
∗Department of FinanceCorvinus University of Budapest
CAMEF, Budapest Workshop2008
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Outline
1 MotivationProblems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
2 The ResultsComparison of Optimal and Observed StrategiesImplementation
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Problems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
Outline
1 MotivationProblems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
2 The ResultsComparison of Optimal and Observed StrategiesImplementation
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Problems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
Problems on the Postal Cash Management System
How can we describe and model the working ofHungarian postal cash management system?We found that:
the aggregate cash level (demand and surplus) is dependon the local decisions of post offices andthe offices are almost independent from the centraladministration.
Consequence 1: Nobody knows the efficiency of theircash-stocking strategies.
Consequence 2 : The uncoordinated decisions of postoffices are important risk factor of the system’s liquidity .
How could be described and measured the activites ofpost offices?
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Problems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
Outline
1 MotivationProblems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
2 The ResultsComparison of Optimal and Observed StrategiesImplementation
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Problems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
Model of Cash-System: Short Description
Actors:Customers: generate random cash-flowscheque (+), pension (-)Post offices: do services day-to-day and keep theirliquidityCash-handling centre: provides needed cash for postofficesCentral Bank : provides extra notes and coins for thesystem in case of aggregate shortage
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Problems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
Working Rules for Post Offices
Let:
St : Stock (cash level) at the start of the day
It : Ordered cash from cash-handling centres (In)
Ct : Cheque: positive cash-flows
Pt : Pensions that offices have to pay: negative cash-flows
Ot : Extra cash sent back to the centres (Out)
Then ∀ discrete t :
St + It + Ct = St+1 + Ot + Pt
St ≤ k
St + It ≥ Pt
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Problems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
Working Rules for the Whole System
Let:
CHCIt : Cash-handling centre cash income
CHCOt : Cash-handling centre cash outcome
Zt : Cash level at cash-handling centre
CBIt : Central bank cash income (from ChC)
CBOt : Central bank cash outcome (to ChC)
Then:
Zt + CHCIt = Zt+1 + CHCOt
CHCIt =∑
Ot + CBOt
CHCOt =∑
It + CBIt+1
(CBOt − CBIt+1)− (Zt+1 − Zt) = (∑
It+1 −∑
Ot)
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Problems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
Time Series of the Aggregate Cash-Flows
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Outline
1 MotivationProblems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
2 The ResultsComparison of Optimal and Observed StrategiesImplementation
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Method of Comparison
Concentrate on only one post office. We seek the distance ofthe office leader’s real strategy from the optimal one!Properties of optimal strategy:
The officer is rational.
The officer observes future cash-flows deterministicly andknows all kinds of costs.
And the reality:
Irrationality: the officer apply heuristic strategy.
The cash-flows are stochastic and costs aren’t well-known.
Measure of distance:
The total cost.
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Working Rules for Post Offices
Illustration: A typical day at the post offices
The post offices decide on:It at time t − 1Ot at time t
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Definition of Optimal Strategy
An {(Os, Is)}s optimal strategy on s ∈ [0, S] if satisfies:
S∑s=1
βs−1 [TC] → min{Os,Is}
TC=̇c (Os) + c (Is) + (Us −Os + Is) rUs+1 = Us + Is + Cs − Ps −Os
Us + Is −Os ≥ Ps
Us −Os ≤ kSs, Is, Os ≥ 0
where:Us=̇Ss−1 + Is−1 + Cs−1 − Ps−1 ≡ Ss + Os
c (y) : transfer cost function (step function)r : interest rateβ : discount factor =̇1/ (1 + r)
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
On Optimal Strategy
The shape of TC:
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Outline
1 MotivationProblems on the Postal Cash Management SystemModel of Cash-System: A Short Introduction
2 The ResultsComparison of Optimal and Observed StrategiesImplementation
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Steps of Solution
Implementation:
We use discrete state dynamic programming.
We solve the problem with Policy Iteration Algorithm.
The Bellman equation:
Vs (Os, Is) = minOs,Is
[XTCs (Os, Is) + βVs+1]
with VS = 0where XTC is an extended total cost function.Simulation:The optimal cash-management strategy (the trajectories) andthe costs are easily computable from the optimal policyfunction.
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Policy Iteration Algorithm
Let:N : the number of state (here: levels of cash)x ∈ R2×NS
+ : policy functionf ∈ RNS×NS : reward functionv ∈ R2×NS : value function
Thus the shape of the Bellman equation eg. for S = 3:
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Steps of Policy Iteration Algorithm
Steps of PIM:1 Given the current value approximant v, update the policy x:
x = arg maxx {f (x) + βv}and update the value by settingv = (I − βI)−1 f (x)
2 If ∆v = 0 then stop, otherwise return to step 1.
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Comparison of Optimal and Observed StrategiesImplementation
Example: Results of a Simulation
Daniel Havran Optimal Cash Management with Dynamic Programming
MotivationThe Results
Summary
Summary
We built up a formal way to describe working postal cashmanagement system.
Effectivity comparison seems to be reachable andcountable.
On some tests we get that post office strategies areseemingly close to the theoretical optimum!
OutlookRethinking the problem in a stochastic environment.To analyse that the two rule (level-limit and liquidity-rule) inwhich way influence the officer leaders strategies.
Daniel Havran Optimal Cash Management with Dynamic Programming
Appendix Some Helpful Books
Some Helpful Books I
M. J. Miranda and P. L. Fackler.Applied Computational Economics and Finance.MIT Press, 2002.
S. Bertsekas.Dynamic Programming and Optimal Control: 2nd edition,Vol I. II.Athena Scientific, 2001.
Daniel Havran Optimal Cash Management with Dynamic Programming