optimization in computational finance and economics edward tsang centre for computational finance...
TRANSCRIPT
Optimization in Computational Finance and
Economics
Edward TsangCentre for Computational Finance and Economics
University of Essex
19 April 2023 All Rights Reserved, Edward Tsang
Synergy in computational finance and economics
Business expert provides behavioral models Computing expert provides software
19 April 2023 All Rights Reserved, Edward Tsang
Amadeo AlentornOld Mutualex-CCFEA
Andreas KrauseBusiness School
Bath
Seminar at CCFEA:Herding behaviour (what happens when traders copy each other?)
Produced software within a few hours (with graphical interface)
Herding Simulator by Alentorn
19 April 2023 All Rights Reserved, Edward Tsang
http://www.amadeo.name/simulations.html
Overview – Optimization in CFE
19/04/23 All Rights Reserved, Edward Tsang
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0 1 2 3 4 5 6 7 8 9 10
Payo
ff
Time t
Decay of Payoff over time
More complex modellingSimpler modelling
Portfolio OptimizationBasic algorithmsMulti-objective
BargainingComplex reasoning
Useful to approximate
Economic Wind-TunnelComplex model
Complex strategies
(Computational Finance and Economics)
Portfolio Optimization
Edward TsangEDDIE / GP
Qingfu ZhangOptimisation
Dietmar MaringerPortfolios
Zhang, Q., Li, H., Maringer, D. & E.P.K. Tsang, E.P.K., MOEA/D with NBI-style Tchebycheff approach for Portfolio Management, Proceedings, Congress on Evolutionary Computation (WCCI 2010), Barcelona, Spain, 18-23 July, 2010http://www.bracil.net/finance/papers.html
Hui LiMOEA
Attention by a Computer Scientist
Surely you know what you want?
Tell me what you want to optimize
I promise to find you a solution
Some methods are better than others
19/04/23 All Rights Reserved, Edward Tsang
Optimizer
Computer Scientist’ attention
Sol
utio
n
Obj
ectiv
e
Attention by an Economist
How to model return? How to model risk? Once we know how to
model them(Mathematically)
As a Rational Agent Surely you can find
the solution
19/04/23 All Rights Reserved, Edward Tsang
Return
Risk
Objective Function
Economists’ attentionS
olut
ion
In order to find solutions, they often have to make simplifying assumptions
Portfolio Optimization Overview
To succeed, one needs to see the full picture
19/04/23 All Rights Reserved, Edward Tsang
PortfolioReturn
Risk
Objective Function
Economists’ attention
Optimizer
Computer Scientist’ attention
19 April 2023 All Rights Reserved, Edward Tsang
Portfolio Optimization Typically: High risk high return Diversification reduces risk Task: find a portfolio: maximize return, minimize risk
Risk
Return
Modern portfolio theory
Expected return is a weighted sum of the individual returns
Expected risk depends on individual risks and correlations of the component assets
Diversification reduces risk
19/04/23 All Rights Reserved, Edward Tsang
Mean-Variance Efficiency Frontier
19/04/23 All Rights Reserved, Edward Tsang
Fix riskMax return?
Line from risk free rate?
Portfolio Optimization ProblemGiven: W: budget n: # of assets available ci: unit price of asset i
ri: expected return of asset i
σij: covariance between assets i and j
K: maximum # of assets to buy
Decision variables xi: investment on asset i
19/04/23 All Rights Reserved, Edward Tsang
Further considerations Assets come in units:
There must be integers ki such that
xi = gi (ki)
where gi is a function of investing in asset i, which may account for transaction costs
Short selling is not allowed:xi must be integers
Budget constraint:
19/04/23 All Rights Reserved, Edward Tsang
n
ii Wx
1
Two objectives
Maximize return R
19/04/23 All Rights Reserved, Edward Tsang
n
i
n
jijjjii ckckV
1 1
1
W
RRR RACash
s
n
iiCash rxWR
11
ii
n
iiRA ckrR
1
1
Minimize Risk V
Optimization in Economics
Dietmar Maringer and Manfred Gilli Threshold Acceptance
– Simplified Simulated Annealing
First to attack the realistic constraints– With integer variables, transaction cost, constraints
19/04/23 All Rights Reserved, Edward Tsang
Single objective optimization: Fix risk, maximize return
Multi-objective Optimization
Given multiple objective functions f1, f2, …, fm
MOEA/D search in variable space x1, x2, …, xn
Decompose problem into single objective problems, each solved by a procedure
Neighbouring procedures exchange solutions– Assuming they have similar landscapes & solutions– Neighbouring defined by distance in weight vectors
Each procedure combines several solutions
19/04/23 All Rights Reserved, Edward Tsang
MOEA/D Performance
First to tackle portfolio optimization with two objectives
Compared favourably against NSGA-II
19/04/23 All Rights Reserved, Edward Tsang
MOPs Performance Criteria
Let A and B be Pareto Front approximations Set Coverage:
C(A,B) = |{u B| vA: v dominates u}| / |B|
0 ≤ C(A,B) ≤ 1
Inverted Generational Distance (IGD-metric):– Measure both diversity and convergence
19/04/23 All Rights Reserved, Edward Tsang
Decomposition in MOEA/D
MOEA/D decomposes problems Two commonly used methods
– Weighted sum – good for convex MOPs– Weighted Tchebycheff – may handle convex MOPs
Both sensitive to scales of the problem NBI (Normal Boundary Intersection)
– Insensitive to scales, but not for MOEA/D
Combine Tchebycheff & NBI in MOEA/D
19/04/23 All Rights Reserved, Edward Tsang
Portfolio Optimization Conclusions
Economist focus on modelling– They assume that solutions can always be found– In reality, they rely on simplifying assumptions
Computer scientists focus on solving– They assume that we always know what we want– In reality, they are part of a loop to explore what is
needed
There is synergy
19/04/23 All Rights Reserved, Edward Tsang
Automated Bargaining
Edward TsangCCFEA
Constraints, Business models
Nanlin JinComputing
Extending Rubinstein ModelEvolving strategies
Abhinay MuthooEconomics
Game Theory
Jin, N., Tsang, E. & Li, J., A constraint-guided method with evolutionary algorithms for economic problems, Applied Soft Computing, Vol.9, Iss.3, June 2009, 924-935http://www.bracil.net/finance/papers.html
19 April 2023 All Rights Reserved, Edward Tsang
Decay of Payoff over time
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0 1 2 3 4 5 6 7 8 9 10Time t
Pa
yo
ff
Bargaining in Game Theory Rubinstein Model:
= Cake to share between A and B (= 1)A and B make alternate offers
xA = A’s share (xB = – xA)
rA = A’s discount ratet = # of rounds, at time Δ per round
A’s payoff xA drops as time goes byA’s Payoff = xA exp(– rA tΔ)
Important Assumptions: – Both players rational– Both players know everything
Equilibrium solution for A:A = (1 – B) / (1 – AB)
where i = exp(– ri Δ)
Notice: No time t here
0 ?xA xB
A B
Optimal offer: xA = A at t=0
In reality: Offer at time t = f (rA, rB, t)
Is it necessary?Is it rational? (What is rational?)
19 April 2023 All Rights Reserved, Edward Tsang
Evolutionary Rubinstein Bargaining, Overview
Game theorists solved Rubinstein bargaining problem– Subgame Perfect Equilibrium (SPE)
Slight alterations to problem lead to different solutions– Asymmetric / incomplete information– Outside option
Evolutionary computation – Succeeded in solving a wide range of problems– EC has found SPE in Rubinstein’s problem– Can EC find solutions close to unknown SPE?
Co-evolution is an alternative approximation method to find game theoretical solutions– Less time for approximate SPEs– Less modifications needed for new problems
19 April 2023 All Rights Reserved, Edward Tsang
Issues Addressed in EC for Bargaining
Representation– Should t be in the language?
One or two population? How to evaluate fitness
– Fixed or relative fitness? How to contain search space? Discourage irrational strategies:
– Ask for xA>1?– Ask for more over time?– Ask for more when A is low?
/
A B
1 B
1
19 April 2023 All Rights Reserved, Edward Tsang
Representation of Strategies A tree represents a mathematical function g Terminal set: {1, A, B} Functional set: {+, , ×, ÷} Given g, player with discount rate r plays at time t
g × (1 – r)t Language can be enriched:
– Could have included e or time t to terminal set – Could have included power ^ to function set
Richer language larger search space harder search problem
19 April 2023 All Rights Reserved, Edward Tsang
Two populations – co-evolution
We want to deal with asymmetric games– E.g. two players may have
different information One population for training
each player’s strategies Co-evolution, using relative
fitness– Alternative: use absolute fitness
Evolve over time
Player 1
…
Player 2
…
… …
19 April 2023 All Rights Reserved, Edward Tsang
Incentive Method: Constrained Fitness Function No magic in evolutionary computation
– Larger search space less chance to succeed
Constraints are heuristics to focus a search – Focus on space where promising solutions may lie
Incentives for certain properties in function returned:– The function returns a value in (0, 1)
– Everything else being equal, lower A smaller share
– Everything else being equal, lower B larger share
Note: this is the key to our search effectiveness
19 April 2023 All Rights Reserved, Edward Tsang
Evolutionary Bargaining Conclusions
Demonstrated GP’s flexibility– Models with known and unknown solutions
– Outside option
– Incomplete, asymmetric and limited information
Co-evolution is an alternative approximation method to find game theoretical solutions– Relatively quick for approximate solutions
– Relatively easy to modify for new models
Genetic Programming with incentive / constraints– Constraints used to focus the search in promising spaces
Evolving Agents
Biliana Alexandrova-KabadjovaCards
Mexico Central Bank
Andreas KrauseBusiness
Bath
Alexandrova-Kabadjova, B., Artificial payment card market - an agent based approach, PhD Thesis, Centre for Computational Finance and Economic Agents (CCFEA), University of Essex, 2007http://www.bracil.net/finance/papers.html
Edward TsangEDDIE / GP
19 April 2023
Agent-based Payment Card Market Model
Costumer Merchant
Interactions atthe Point Of Sale
PaymentCard
provider
Costumer’s feesand benefits
Merchant’s feesand benefits
Government: public interest drives regulations
Connected(topology)
Possible Objectives:• Maximize profit• Maximize market shareLearning optimal strategies
Consistent patterns observed with static agents
Decisions, decisions
Modelling is commonly used
Decisions dependency (from the bank’s point of view)
19/04/23 All Rights Reserved, Edward Tsang
Customer Benefits
Merchant Fixed Fee
Customer’s decision to
use the card
Customer’s decision to hold a card
Merchant’s decision to hold a card
# of Merchants
accepting the card
Banks’ Profits
Publicity Cost
Customer Fixed Fee
Merchant Benefits
Banks’ Market Share
# of Customers
using the card
# of Merchants
using the card
# of Customers having the
card
Learning optimal strategies
19/04/23 All Rights Reserved, Edward Tsang
Each card makes the following decisions:– Publicity cost, fixed/variable fees to consumers/merchants
PBIL used to evolve strategies – Converged after 3,000 runs; observations being analysed
Card 1 decisions
Card 2 decisions
Card n decisions
…
Probabilistic Model on the decisions
Market simulation:Interaction between consumers and merchants
Population-based Incremental Learning (PBIL)
19/04/23 All Rights Reserved, Edward Tsang
Statistical approach Related to ant-colonies, GA
Model M: x = v1 (0.5)x = v2 (0.5)y = v3 (0.5)y = v4 (0.5)
Sample from M solution X, eg <x,v1><y,v4>
Evaluation X
Modify the probabilities
0.60.4
0.60.4
Economic Wind-tunnels Conclusions
Markets are complex systems It is not easy to predict the consequences of
actions But modelling is better than wild-guessing No model is correct But some are useful Useful for policy making as well as strategies
development
19/04/23 All Rights Reserved, Edward Tsang
Conclusions
19 April 2023 All Rights Reserved, Edward Tsang
Optimization in Finance & Economics, Conclusions
Computer Scientists:– Surely you know what you want?
Economists:– Rational agents should find optimal solutions
Reality:– We don’t really know what we want– Perfect rationality doesn’t exist
Synergy in Computation + Finance/Economics– Optimization experts have key role to play
Game Theory Hall of Frame
John Harsanyi
John Nash Reinhard Selten
Robert Aumann
Thomas Schelling
1994 Nobel Prize
2005 Nobel Prize
19 April 2023 All Rights Reserved, Edward Tsang
1978 Nobel Economic Prize Winner
Artificial intelligence “For his pioneering research into the decision-
making process within economic organizations" “The social sciences, I thought, needed the same
kind of rigor and the same mathematical underpinnings that had made the "hard" sciences so brilliantly successful. ”
Bounded Rationality – A Behavioral model of Rational Choice 1957
Sources: http://nobelprize.org/economics/laureates/1978/ http://nobelprize.org/economics/laureates/1978/simon-autobio.html
Herbert Simon (CMU)
Artificial intelligence
19 April 2023 All Rights Reserved, Edward Tsang
Why Modelling? Scientific Approach
– Modelling allows scientific studies. – Human expert opinions are valuable, – But best supported by scientific evidences
Multiple Expertise– models can be built by multiple experts at the same time– The resulting model will have the expertise that no single expertise can
have. Models are investments
– Models will never leave the institute as experts do. – Investments can be accumulated.
19 April 2023 All Rights Reserved, Edward Tsang
Why Agent Modelling
Agent modelling allows– Heterogeneity– Geographical distribution– Micro-behaviour to be modelled
Representative models don’t allow these Micro-behaviour makes the market
19 April 2023 All Rights Reserved, Edward Tsang
Agent-based Payment Card Market Model
Government: public interest drives regulations Possible Objectives:
• Maximize profit• Maximize market share
Costumer Merchant
Interactions atthe Point Of Sale
PaymentCard
provider
Costumer’s feesand benefits
Merchant’s fees and benefits
Connected(topology)
Learning optimal strategies
Consistent patterns observed with static agents
Decisions, decisions
19 April 2023 All Rights Reserved, Edward Tsang
Research Profile, Edward Tsang
Application Technology
Finite Choices Decision Support, e.g. Assignment, Scheduling, Routing
Constraint Satisfaction, Optimisation, Heuristic Search (Guided Local Search)
Financial Forecasting Genetic Programming
Automated Bargaining Genetic Programming
Wind Tunnel Testing for designing markets and finding winning strategies
Mathematical Modelling, Machine Learning, Experimental Design
Portfolio Optimisation Multi-objectives Optimisation
Business Applications of Artificial Intelligence