Optimal Time-Varying Cash Allocation

Optimal Time-Varying Cash Allocation

DEGREE PROJECT IN MATHEMATICS, SECOND CYCLE, 30 CREDITS STOCKHOLM, SWEDEN 2020 Optimal Time-Varying Cash Allocation DAVID OLANDERS KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ENGINEERING SCIENCES Optimal Time-Varying Cash Allocation DAVID OLANDERS Degree Projects in Scientific Computing (30 ECTS credits) Master’s Programme in Applied and Computational Mathematics (120 credits) KTH Royal Institute of Technology year 2020 Supervisor at Trustly Group AB: Ludvig Vikström Supervisor at KTH: Sigrid Källblad Nordin Examiner at KTH: Sigrid Källblad Nordin TRITA-SCI-GRU 2020:087 MAT-E 2020:050 Royal Institute of Technology School of Engineering Sciences KTH SCI SE-100 44 Stockholm, Sweden URL: www.kth.se/sci iii Abstract A payment is the most fundamental aspect of a trade that involves funds. In recent years, the development of new payment services has accelerated signif- icantly as the world has moved further into the digital era. This transition has led to an increased demand of digital payment solutions that can handle trades across the world. As trades today can be agreed at any time wherever the payer and payee are located, the party that mediates payments must at any time to be available in order to mediate an agreed exchange. This requires the pay- ment service provider to always have funds available in the required countries and currencies in order for trades to always be available. This thesis concerns how a payment service provider can reallocate capital in a cost efficient way in order for trades to always be available. Traditionally, the reallocation of capital is done in a rule-based manner, which discard the cost dimension and thereby only focus on the reallocation itself. This thesis concerns methods to optimally reallocate capital focusing on the cost of transferring capital within the network. Where the concerned methods has the potential of transferring capital in a far more cost efficient way. When mathematically formulating the reallocation decisions as an opti- mization problem, the cost function is formulated as a linear program with both Boolean and real constraints. This impose non-feasibility of locating the optimal solution using traditional methods for linear programs, why developed traditional and more advanced methods were used. The model was evaluated based on a large number of simulations in comparison with the performance of a rule-based reallocation system. The developed model provides a significant cost reduction compared to the rule-based approach and thereby outperforms the traditional reallocation system. Future work should focus on expanding the model by broadening the available transfer options, by increasing the considered uncertainty via a bayesian treatment and finally by considering all cost aspects of the network. iv Sammanfattning En betalning är den mest fundamentala aspekten av handel som involverar ka- pital. De senaste åren har utvecklingen av nya betalmedel ökat drastiskt då världen fortsatt att utvecklas genom digitaliseringen. Utvecklingen har lett till en ökad efterfrågan på digitala betalningslösningar som kan hantera handel över hela världen. Då handel idag kan ske när som helst oberoende av var be- talaren och betalningsmottagaren befinner sig, måste systemet som genomför betalningen alltid vara tillgängligt för att kunna förmedla handel mellan olika parter. Detta kräver att betalningssystemet alltid måste ha medel tillgängligt i efterfrågade länder och valutor för att handeln ska kunna genomföras. Den här uppsatsen fokuserar på hur kapital kostnadseffektivt kan omallokeras i ett betalsystem för att säkerställa att handel alltid är tillgängligt. Traditionellt har omallokeringen av kapital gjorts på ett regelbaserat sätt, vilket inte tagit hänsyn till kostnadsdimensionen och därigenom enbart foku- serat på själva omallokeringen. Den här uppsatsen använder metoder för att optimalt omallokera kapital baserat på kostnaderna för omallokeringen. Däri- genom skapas en möjlighet att flytta kapital på ett avsevärt mer kostnadseffek- tivt sätt. När omallokeringsbesluten formuleras matematiskt som ett optimerings- problem är kostnadsfunktionen formulerad som ett linjärt program med både Booleska och reella begränsningar av variablerna. Detta gör att traditionella lösningsmetoder för linjära program inte är användningsbara för att finna den optimala lösningen, varför vidareutveckling av tradtionella metoder tillsam- mans med mer avancerade metoder använts. Modellen utvärderades baserat på ett stort antal simuleringar som jämförde dess prestanda med det regelba- serade systemet. Den utvecklade modellen presterar en signfikant kostnadsreduktion i jäm- förelse med det regelbaserade systemet och överträffar därigenom det traditio- nellt använda systemet. Framtida arbete bör fokusera på att expandera model- len genom att utöka de potentiella överföringsmöjligheterna, att ta ökad hän- syn till osäkerhet genom en bayesiansk hantering, samt slutligen att integrera samtliga kostnadsaspekter i nätverket. v Acknowledgement This thesis is the final part of my Master’s degree in Applied and Computa- tional Mathematics at KTH Royal Institute of Technology in Stockholm, Swe- den. My work was carried out at Trustly Group AB who welcomed me with open arms and enthusiastic support. Here, I wish to express my profound grat- itude to all who contributed in creating this opportunity for me to finish my Master’s degree, but also to all who supported me throughout my work with this thesis. First of all, I would like to thank my supervisor at Trustly Group AB, Ludvig Vikström, who throughout my work supported me with both valuable theoret- ical knowledge and technical experience. Ludvig has always been available whenever I have asked for guidance, and his background as a Data Scientist with deep mathematical knowledge helped me through the challenge of ap- proaching an optimization problem as a Master’s student from the statistical branch. I am very thankful to Trustly Group AB who gave me the opportunity to deepen my optimization skill set while simultaneously integrating me into the organi- zation. I have had the luxury of closely witnessing very competent people in action inside a rapidly evolving company, which have made me develop and learn skills valuable in my future career. Thanks to my academical supervisor Sigrid Källblad Nordin, who supported me and energized my work with enthusiastic compliments of my thesis’s prob- lem setting. Our discussions help me in finding the path to my proposed solu- tion. Lastly, thanks to my family for unconditional support, encouragement and love. Completing my Engineering’s degree and especially my Master’s de- gree would never have been possible without your support and help. Stockholm, May 2020 David Olanders Contents 1 Introduction 1 2 Payment Services 4 2.1 Transfer Network . .4 2.2 Network Management . .5 2.3 Network Costs . .5 2.4 Network Delimitations . .7 2.5 Cash Allocation . .8 3 Mathematical Background 9 3.1 Constrained Optimization . .9 3.1.1 Convex and Non-Convex Optimization . 10 3.1.2 Linear Programming . 11 3.1.3 Integer Linear Programming . 11 3.1.4 Mixed Integer Linear Programming . 12 3.1.5 Relaxation of a Mixed Integer Linear Program . 13 3.1.6 Duality . 13 3.1.7 Big-M Method . 14 3.2 Bayesian Inference . 15 3.2.1 Bayesian Decision Theory . 17 3.3 Graph Notation . 17 4 Data 19 4.1 Available Data . 19 4.1.1 Initial Exploration . 21 4.1.2 Missing Data Handling, Simplifications and Final Mod- elling Data . 22 vi CONTENTS vii 5 Methods 23 5.1 Mathematical Formulation of the Transfer Networks Optimiza- tion Problem . 23 5.1.1 Reduced Optimization Formulation . 24 5.2 Algorithms . 25 5.2.1 The Simplex Method . 25 5.2.2 The Dual Simplex Algorithm . 26 5.2.3 Branch-and-Bound for ILP and MILP . 27 5.2.4 Branch-and-Cut . 33 5.3 Probability Distribution Fitting of Available Data . 33 5.4 Simulation Driven Approach of Calculating the Expected cost 34 5.4.1 Considering Uncertainty . 34 6 Results and Discussion 36 6.1 Initial Capital Allocation . 36 6.2 Network Case One - Without Internal Transfers . 37 6.3 Network Case Two - Rule-Based Transfers . 39 6.4 Network Case Three - Optimized Reallocation . 40 6.5 Discussion . 42 7 Conclusions and Future Work 45 Bibliography 47 A Flow chart of the Simplex method 50 B Flow chart of the Branch-and-Bound algorithm 52 List of Figures 3.1 An example of a visual representation of a network with ver- tices v and edges e, collected from [19]. 18 4.1 Sample from the data file containing the bank accounts. 19 4.2 Sample from cost file containing transaction costs. 20 4.3 A sample from the transaction file containing the Pay-ins and Pay-outs. 20 4.4 A sample from the pre-processed transaction data. 21 5.1 The feasible region L0 of an example ILP, collected from [20]. 28 5.2 The enumeration tree after the first branching, collected from [20]. 29 5.3 The first subdivision of the feasible region, collected from [20]. 29 5.4 The enumeration tree after the second branching, collected from [20]. 30 5.5 The final subdivision of the feasible region, collected from [20]. 31 5.6 The final enumeration tree, collected from [20]. 32 6.1 Median with 90% confidence interval of 1000 random sam- ples of daily flows with replacement for summation of nega- tive balance over the entire network . 38 6.2 Relation between the Starting Balance multiple and how reli- able the Transfer network is in terms of Pay-outs. 38 A.1 The Simplex method, collected from [21] . 51 B.1 The Branch-and-Bound algorithm for a maximization ILP prob- lem, collected from [20]. 53 viii LIST OF FIGURES ix List of Abbreviations Table 1: Reference table for the abbreviations used throughout the thesis Abbreviation Acronym Definition FinTech Financial Technology LP Linear Programming ILP Integer Linear Programming MILP Mixed Integer Linear Programming EUR Euro MEUR Million Euro Cur Currency List of Tables 1 Reference table for the abbreviations used throughout the thesis ix 4.1 Summarized data information .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    72 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us