# Adding a level of randomness

In the simulations an opportunity will have a Gamma distribution and a cost, determined by a quantile of the distribution. Entrepreneurs will have an initial cash position that they can invest in opportunities, which payout, and they consume the maximum of a constant and a constant proportion of their wealth.  In this set up, the ruin time distribution of the investors will depend on the parameters.

Taking a simple case where k=5.0, θ=1.5 and the cost quantile is 3.0, so that the cost of each opportunity is 5.45 and running the following simulation

import numpy as np
import numpy.random
import scipy.stats as stats
from scipy.special import gammaincinv
import matplotlib.pyplot as plt

#
# MAIN CODE
#
#Number of runs
N_runs=10000
ruin_time=np.zeros(N_runs)

k=5.0
theta=1.5
q=0.3
cost = np.around( theta*gammaincinv(k,q), decimals=5)

for run in range(N_runs):
cash = 6.0
i=0
while ( (cash >=0.0) and (i<100) ):
i=i+1
np.random.seed(22042006+run+i)
p=np.random.rand()
repay= np.around(theta*gammaincinv(k,p), decimals=5)
cash = cash-cost+repay-max(0.8,cash/6.0)
if (i>=100):
i=0
ruin_time[run]=i

non_zero=np.flatnonzero(ruin_time)

hist, bins=np.histogram(ruin_time[non_zero], bins=(np.asarray(range(100))+0.01))
fig = plt.figure()

ax.bar(np.asarray(range(99)),hist)
plt.show()


results in the following distribution of ruin times (the total number of runs is 10,000)

Making a subtle change, that k~10*Β(2,2) and θ~U(0,3) so that E[k]=1.5 and E[θ]=1.5, and running the following simulation

import numpy as np
import numpy.random
import scipy.stats as stats
from scipy.special import   gammaincinv
import matplotlib.pyplot as plt

#
# MAIN CODE
#
#Number of entrapeneurs
N_runs=10000
ruin_time=np.zeros(N_runs)

# If k=10.0*stats.beta.ppf(r,2,2) then E[k]=5
#If theta=3.0*r then E[theta]=1.5
k=5.0
theta=1.5
q=0.3

for run in range(N_runs):
cash = 6.0
i=0
while ( (cash >=0.0) and (i<100) ):
i=i+1
r=np.random.rand()
k=10.0*stats.beta.ppf(r,2,2)
theta=3.0*np.random.rand()
cost = np.around( theta*gammaincinv(k,q), decimals=5)
if (cost<cash): np.random.seed(22042006+run+i)="" p="np.random.rand()" repay="np.around(theta*gammaincinv(k,p)," decimals="5)" cash="cash-cost+repay-max(0.8,cash/6.0)" else:="" if="" (i="">=100):
i=0
ruin_time[run]=i

non_zero=np.flatnonzero(ruin_time)

hist, bins=np.histogram(ruin_time[non_zero], bins=(np.asarray(range(100))+0.01))

fig = plt.figure()
ax.bar(np.asarray(range(99)),hist)
plt.show()


then  no entrepeneurs survive more than 100 steps and we get the following distribution with an average ruin time of 13 steps

This highlights the effect of random opportunities.

If we use this random allocation of opportunities with q=0.2, we infer that about 58% or the entrepreneurs are ruined by step 20 (with the fixed opportunity distribution, 4% of the entrepreneurs are ruined by step 20).

# Fair Interest Rates

Consider a single period model in which an opportunity, $X \in (\alpha,\beta)$, has a random pay-off determined by a known distribution function, as discussed in Modelling Investment Opportunities. We assume there is no time-value of money (the market does not pay a risk free interest rate). An entrepreneur wishes to fund the opportunity by taking out a loan $\alpha, what interest rate should a lender demand for the loan?

Employing the concept of reciprocity we can calculate the interest rate by identifying the repayment amount $l^*$ such that

$l^*=\min\left\{x>l\;\big|\;\mathbb{E}\big[\min\{X,l^*\} \big]=l \right\}$

Assuming $X$ has a continuous distribution, we can identify $l^*$ by looking for the solution of

$\int_\alpha^{l^*} x\, p(x)\, dx + l^*\int_{l^*}^\beta p(x)\,dx =l,$

where $p(x)$ is the probability density of $X$. This is trivial to calculate employing Newton-Raphson and there is a unique solution such that $l^*>l$ for $l>\alpha$. On this basis the simple interest rate in the single period model is given by

$r = \frac{l^*-l}{l} .$

What is not immediately obvious, but has emerged when simulating,  is that if $X\sim\Gamma(k, \theta)$ then, for fixed $l$, $r$ is invariant with respect to $\theta$, the scale parameter. Similarly, if $X\sim \mathrm{LN}(\mu,\sigma)$ then, for fixed $l$, $r$ is invariant to $\mu$, the scale parameter.

Questions

1. Does this link to risk neutral pricing in a Black-Scholes world, where the discounted asset prices evolve log-normally with zero drift, i.e. $\mu=0$.
2. Can these observations be proved to be true in general for distributions defined by shape/scale parameters?

The answer to the second question is possibly related to the fact that $l$ satisfies the expression

$\int_0^l p(x; k, \theta)\; dx=q \in (0,1).$

The fact that the fair interest rate is invariant to scale parameters is interesting since the expected return is dependent on the scale.  Doing some simulations with the Gamma distribution and varying the parameter $q$ delivers the following result

This plot was produced using the following python code

import numpy as np
import scipy.stats as stats
from scipy.special import gammainc,  gammaincinv, gammaincc, gammainccinv, gamma
import matplotlib.pyplot as plt

#Define a function to calculate the fair value loan repayment
# k, theta are the distribition parameters for the project payoff
# L is the value of the loan requested
def loan_repayment(k,theta,L):

# Defining function to integrate
#f1 calculates the expected value if the project pays out less than x
f1 = lambda u: u*stats.gamma.pdf(u,k, scale = theta)

#initialise parameters
diff=L
x=L
# Do Newton-Raphson
while diff>L/100:
I1, err = quad(f1, 0, x)
I2 = gammaincc(k,x/theta)
num= I1 + x*I2 - L
x = x - num/I2
diff=np.fabs(num/I2)
return x
#
#Do the plot
#
#Set the variables/output, a bit clunky
theta=1.0
k_5=np.arange(0.2,10.1,0.2)
k_10=np.arange(0.2,10.1,0.2)
k_20=np.arange(0.2,10.1,0.2)
k_40=np.arange(0.2,10.1,0.2)

k_j=0.0
#Lookp over shape parameter, and calculate r for different q's
for j in range(len(k_5)):
k_j=(j+1)*0.2
L=theta*gammaincinv(k_j,0.05)
Lr=loan_repayment(k_j,theta,L)
k_5[j]=(Lr-L)/L
L=theta*gammaincinv(k_j,0.1)
Lr=loan_repayment(k_j,theta,L)
k_10[j]=(Lr-L)/L
L=theta*gammaincinv(k_j,0.2)
Lr=loan_repayment(k_j,theta,L)
k_20[j]=(Lr-L)/L
L=theta*gammaincinv(k_j,0.4)
Lr=loan_repayment(k_j,theta,L)
k_40[j]=(Lr-L)/L

#Set up the x-axis, a bit clunky
x=np.arange(0.2,10.1,0.2)

#Do the plot
fig, ax = plt.subplots()
ax.plot(x, k_5, 'r-', label='$q=5\%$')
ax.plot(x, k_10, 'b-', label='$q=10\%$')
ax.plot(x, k_20, 'g-', label='$q=20\%$')
ax.plot(x, k_40, 'k-', label='$q=40\%$')
plt.xlabel('Shape $k$')
plt.ylabel('Fair interest rate')
plt.title(r'Fair interest rate, $\theta=1.0$, $q$ varies')

# Now add the legend with some customizations.
legend = ax.legend(loc='upper right')
for label in legend.get_texts():
label.set_fontsize('large')

for label in legend.get_lines():
label.set_linewidth(1.5)  # the legend line width
plt.show()


## Modelling Investment Opportunities

### Image

I will need to generate random opportunities for the entrepreneurs in my economy.  These opportunities will have to be funded, probably by involving other entrepreneurs, and so I need to specify an opportunity by its distributional characteristics and its initial cost.

Typically one would choose a log-normal distribution for the outcome of an investment opportunity, but I don’t like the implied scale invariance of log-normality.  I prefer to use the Gamma Distribution, which is sometimes used to model aggregate claims in insurance,  with the density given by

$p(x; k, \theta) = \frac{1}{\Gamma(k)\theta^k} x^{k-1}e^{-\frac{x}{\theta}}$

where $k>0$ is the shape and $\theta>0$ is the scale.  The expected value of a Gamma distributed random variable is $k \theta$ while its variance is $k \theta^2$.

I need to have a consistent method of defining the initial cost of the opportunity and will base it on the CDF of the distribution, specifically I will define a parameter $q\in(0,1)$ that will be used to specify the profitability of the economy and defines the cost, $l$, of an opportunity by

$q = \int_0^l p(x; k, \theta)\; dx.$

The attached plot shows the value of $l$ for $k \in (0.2,10.0)$ and $\theta \in (0.2,3.0)$ with $q=0.1$.

# Objectives of the Project

The public bailouts of financial institutions during the Financial Crisis of 2007-2009 have resulted in the degradation of public trust in the financial system. Less well known is that mathematics has been criticised by the regulators, professional bodies and civil society as having contributed to financial crises by placing a veil over financial practice. This project looks to restore public trust in both finance and mathematics.

The project is specifically concerned with the observation that banking systems with a significant component of not-for-profit institutions required less public support during the Crisis than systems dominated by private banks. This observation will be considered in the context of a theoretical basis in moral philosophy: what is the relationship between ethics and the structure of the polis. In particular, is the observed difference in bailouts a consequence of differing commercial cultures and will a system based on reciprocity perform better than one based on profit maximisation? The motivation for this approach is that legislatures in both the UK and US identified a decline in commercial ethics as being significant causal factor in the Crisis and has emerged out of my experience as the RCUK Academic Fellow in Financial Mathematics between 2006 and 2011.

The project is centred on research that will investigate the resilience and effectiveness of financial systems based on different commercial cultures using techniques from Applied Probability and Complexity Science, in particular Stochastic and Adaptive Networks.  The research question of this project is to determine whether financial systems are more or less resilient and effective if based on different commercial cultures, e.g.: profit/loss sharing (Islamic musharakah), if loan interest is based purely on objective risk born by lender (Scholastic usury prohibition), if the interest rate is determined by the opportunity cost (market based) or if interest aims to maximise returns to the lender. It will model financial systems as graphs and study how the different commercial cultures affect the evolution of the graph topology, and then how money/credit is transmitted on different graph topologies. Effectiveness will be measured by the efficiency in enabling lending and resilience by the ability of a financial network to withstand shocks generated by losses. This research question addresses an issue moral philosophy: what is the relationship between ethics and the structure of the polis and is motivated by the thesis that reciprocity emerges as a social norm in communities where exchange is important (e.g. [6]).

The hypothesis of the project is that there will be greater homophily between the agents in a financial network based on reciprocity than in a network focused on profit maximisation and this will create more resilient and effective financial networks (e.g. [4] in a different context). The objective of the project is to employ mathematics to test the hypothesis in support of the view that the ethical concept of reciprocity is intrinsic to the development of successful markets. These views are rooted in the Aristotelian position that ethics are the practices that sustain communities, and reciprocity is a virtue internal to market exchange, topics of Pragmatic philosophy and contemporary Virtue ethics.

The project is a response to financial crises and scandals since 2007. In particular, in 2012 I organised the 2013 IMA Conference on Mathematics in Finance with participation from the Bank of England. The representative of the Bank highlighted the need for mathematicians to shift their perspective away from stochastic calculus and re-focus from micro- to macro-economic issues and address the concerns identified in [10, para. 89, v. II], that mathematics aids ‘insincerity’ in financial practice. A key priority for the Bank was in developing network models of the financial system, building on [5] and [1]. Simultaneously there have been calls from, so-called, heterodox economists for their profession to focus on economics as a complex, evolving system (e.g. [2], [9, ‘The way forward’], [7]). Finally, there is a general concern with commercial ethics (e.g. [10]) along with a scholarly recognition that commerce can have a positive role in morality (e.g. [3]). Influenced by these external factors the PI has developed the thesis, in [8], that reciprocity, not profit maximisation, is the foundation of of the Fundamental Theorem of Asset Pricing of Financial Mathematics.

Since the Financial Crisis there has been accelerating interest in applying Network Theory to investigate financial systems. The novelty of this project is it is concerned with different commercial cultures, the structures of financial networks that these cultures generate and their different behaviours. Specifically, it does not assume that the objective of a financial agent is to maximise profit. This immediately connects the project to researchers seeking to re-orientate finance and distinguishes the approach taken in the project from existing approaches that are based on the conventional economic assumption of utility maximisation.

References

[1]    N. Arinaminpathy, S. Kapadia, and R. May. Size and complexity in model financial systems. Technical report, Bank of England, 2012. Working Paper No. 465.
[2]    D. Colander, M. Goldberg, A. Haas, K. Juselius, A. Kirman, T. Lux, and B. Sloth. The financial crisis and the systemic failure of the economics profession. In J. Friedman, editor, What Caused the Financial Crisis, pages 262—278. University of Pennsylvania Press, 2011.
[3]    M. Fourcade and K. Healy. Moral views of market society. Annual Review of Sociology, 33:285—311, 2007.
[4]    B. Golub and M. O. Jackson. How homophily affects the speed of learning and best-response dynamics. The Quarterly Journal of Economics, In press.
[5]    A.G. Haldane and R. M. May. Systemic risk in banking ecosystems. Nature, 469:351—355, 2011.
[6]    J. Henrich, R. Boyd, S. Bowles, C. Camerer, E. Fehr, and H. Gintis. Foundations of Human Sociality. Oxford University Press, 2004.
[7]    G. M. Hodgson. On the complexity of economic reality and the history of the use of mathematics in economics. Filosofía de la Economía, 1(1):25 — 45, 2013.
[8]    T. C. Johnson. Reciprocity as the foundation of Financial Economics. The Journal of Business Ethics, In review. Available at SSRN: http://ssrn.com/abstract=2334127.
[9]    T. Lawson. Really reorienting modern economics. In Conference @ King’s. Institute for New Economic Thinking, 2010.
[10]    PCBS. Changing Banking for Good. Technical report, The Parliamentary Commission on Banking Standards, 2013.