optimization in computational finance and economics edward tsang centre for computational finance...

43
Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 12 June 2022 All Rights Reserved, Edward Tsang

Upload: dale-may

Post on 28-Dec-2015

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

Optimization in Computational Finance and

Economics

Edward TsangCentre for Computational Finance and Economics

University of Essex

19 April 2023 All Rights Reserved, Edward Tsang

Page 2: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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)

Page 3: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

Herding Simulator by Alentorn

19 April 2023 All Rights Reserved, Edward Tsang

http://www.amadeo.name/simulations.html

Page 4: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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)

Page 5: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 6: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 7: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 8: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 9: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 10: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 11: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

Mean-Variance Efficiency Frontier

19/04/23 All Rights Reserved, Edward Tsang

Fix riskMax return?

Line from risk free rate?

Page 12: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 13: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 14: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 15: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 16: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 17: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

MOEA/D Performance

First to tackle portfolio optimization with two objectives

Compared favourably against NSGA-II

19/04/23 All Rights Reserved, Edward Tsang

Page 18: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 19: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 20: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 21: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 22: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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?)

Page 23: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 24: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 25: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 26: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

… …

Page 27: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 28: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 29: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 30: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 31: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

Modelling is commonly used

Page 32: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 33: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 34: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 35: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 36: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

Conclusions

Page 37: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 38: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

Game Theory Hall of Frame

John Harsanyi

John Nash Reinhard Selten

Robert Aumann

Thomas Schelling

1994 Nobel Prize

2005 Nobel Prize

Page 39: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 40: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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.

Page 41: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 42: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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

Page 43: Optimization in Computational Finance and Economics Edward Tsang Centre for Computational Finance and Economics University of Essex 15 September 2015All

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