Software implementation of a portfolio choice model with discrete stochastic shocks
Year: 2026
Type: software
Abstract: This record contains the Python script portfolio_model-v7.py used to obtain the numerical results of Chapter 3 of the dissertation for the degree of Candidate of Economic Sciences «Capitalization of a Private Investor’s Monetary Funds as a Source of Macrofinancial Stability of Ukraine» (specialty 08.00.08 «Money, Finance and Credit», Taras Shevchenko National University of Kyiv). The script implements a one-period CRRA expected-utility optimization over six forms of a private investor’s monetary funds: foreign cash currency (USD/EUR), term deposits in UAH, stablecoins, term deposits in foreign currency, UAH-denominated domestic government bonds (OVDP) and FX-denominated OVDP. Uncertainty is modelled by six independent Bernoulli shocks (regulatory, exchange-rate/inflation, stablecoin, physical, global currency and systemic), which give 2⁶ = 64 states of the world. Losses under simultaneous shocks compose multiplicatively. The risk aversion coefficient is calibrated to the empirical structure of the household sub-portfolio. The reproduction checkpoint is γ** = 8.5, L₂ = 0.062, optimal weights 69.5 / 11.8 / 4.8 / 8.4 / 5.4 / 0.0 %. Beyond calibration, the script performs: sensitivity analysis with respect to shock probabilities and loss parameters; decomposition of the optimum by the shock-exclusion method; comparison of loss-composition forms; joint identification of risk aversion and expected depreciation; estimation of the cost of hedging and welfare loss; estimation of institutional and price levers of capitalization, including OLS semi-elasticities of the cash share. All parameters are embedded in the code, so no external data files are required. Rates of return are taken from the National Bank of Ukraine financial-market statistics for 2025, and US inflation from the BLS consumer price index. The loss matrix and shock probabilities follow Chapter 2 of the dissertation; the probability of the systemic shock is an expert assessment. Computations are deterministic (fixed random seed). Requirements: Python 3, NumPy, SciPy (tested with Python 3.12.3, NumPy 2.4.4, SciPy 1.17.1). Run: python3 portfolio_model-v7.py. Code comments and console output are in Ukrainian.
Author: Morozov, Anton
Institution: Taras Shevchenko National University of Kyiv
Language: Ukrainian
Field: Decision Sciences
Domain: Social Sciences
Open Access status: green
OpenAlex ID: W7225038195
