48
Stochastic Programming Tools And Components Gautam Mitra

Stochastic Programming Tools And Components Gautam Mitra

Embed Size (px)

Citation preview

  • Stochastic Programming Tools And ComponentsGautam Mitra

  • Outline

    Scope and objectivesDecision making under uncertaintyStochastic processes and Scenario GenerationInformation systems architectureComputational systems architectureApplication to ALMConclusions

  • Scope and Objectives Descriptive Models as defined by a set of mathematical relations, which simply predicts how a physical, industrial or a social system may behave. Normative Models constitute the basis for (quantitative) decision making by a superhuman following an entirely rational that is, logically scrupulous set of arguments. Hence quantitative decision problems and idealised decision makers are postulated in order to define these models. Prescriptive Models involve systematic analysis of problems as carried out by normally intelligent persons who apply intuition and judgement. Two distinctive features of this approach are uncertainty analysis and preference (or value or utility) analysis. Decision Models are in some sense a derived category as they combine the concept underlying the normative models and prescriptive models.

  • Data ModelDecision Model Constrained optimisationDescriptive ModelSimulation and Evaluation

    Ex ante decision Scope and Objectives Ex post evaluation(simulation)

  • Decision making under uncertaintyThere are three established approaches:Stochastic Programs : SP [Recourse Models, Chance constrained programming]Dynamic Programming: DPStochastic Control: SCN

    After a broad overview we return to SP models for illustrations of our modelling concepts.

  • Stochastic Programming : SP

    Given a general range of T stages, the stochastic data process is defined as: and the decision process is represented as . represents a sequence of random vectors and x represents a sequence of decisions where is of dimension Both TSP and MSP are defined on a probability space () and the data path corresponds with the -field which precedes the stage t of the data process. The observations (of the state of the world) and decisions are set out as a sequence TSP: Two stage stochastic programMSP: Multi stage stochastic program Decision making under uncertainty

  • Dynamic Programming: DP

    The general set of notations adopted by us closely follows those set out by Dupacova and Sladky (2002) who investigated the connections between MSP and DP. Let denote a set of states and called State Space, let denote a set of permissible decisions called Decision Space, denote a set of parameter realisations such that . (see Bertsekas and Tsitsiklis (1996) and Powell and Carvalho (1998)).For every stage t = 1..T we define where We also note that

    We assume that is given and is mapping from onto A sequence of decisions is called a policy thus optimal policy upto t is defined asOptimum_Policy (t)=[d(1),d(2),,d(t)]_optimum. Decision making under uncertainty

  • Stochastic Control: SCNDesign of feedback laws to modify behaviour of a dynamical system under uncertainty is an active and well-established area of research. While stochastic control methods were originally motivated by engineering applications, they have found applications in portfolio management and in supply chain planning. Portfolio optimisation under risk constraint involves the use of feedback, as the monies from the sale of units of one asset may be used to purchase units of another asset. For a family of continuous time stochastic processes indexed by a control parameter , stochastic control problem is defined by assigning a real-valued cost function

    And minimising the expectation over admissible controls. For a broad class of cost functions and of stochastic differential systems, this problem reduces to solving a partial differential equation, called Hamilton-Jacobi-Bellman equation. Applications of stochastic control in finance are discussed in Korn (1997 ), Hansen and Sergent (2001) and in Fleming (1995). Similar feedback-based problems also arise in supply chain planning and control theory based methods may be used for systematic decision-making processes for the supply chain. Perea et al (2003, 2000) have proposed applying different control theoretic approaches to supply chain management. Decision making under uncertainty

  • The modelling paradigms revisitedStage 0 : Analyse historical data [ data model ]Stage 1 : Create data paths for random parameter values [ descriptive models ]Stage 2 : Make decision using SP or DP or SCN[ decision models ] {data processes and decision processes are inter-twined}Stage 3 : Test the decisions using simulationBack testing, stress testing (out of sample)[ descriptive models ] Decision making under uncertainty

  • Classes of SP Problems Decision making under uncertainty

  • SP Software Tools

  • SP Paradigm Decision making under uncertaintyStochastic programming seen as a combination of optimisation decision models and models of randomness

  • Stochastic processes and SGThere are many well established methods/ models for describing random parameters over a temporal setting.The models can be summarised as:AR, MA , ARMA, ARCH, GARCH, ...Regression: quantile, robustSDEs, GBMForecasting: Parametric, nonparametricSimulators: MCMC, HiddenMC, VECM, Bootstrap

    Real applications use Domain specialists model/knowledge

  • Stochastic processes and SG

  • Stochastic processes and SG

  • Stochastic processes and SG

  • Stochastic processes and SG Stochastic processes generate data in form of fans/time series but SP needs trees

  • Stochastic processes and SG The research problems are investigated by: Georg Pflug, Jitka Dupacova, Michael Dempster, Werner Romisch and others

    ARCH/GARCHROBUST REGRESSIONTIME SERIESBROWNIAN MOTIONSDEs

  • Consider events

    Recall the Indicator Function

    - stage SP: Find -measurable decisions

    With Recourse Objective

    Constraint of the form

    Perspective on Scenario Generation

    Alternative Objective functions or constraint functions created using the scenario generator:Stochastic processes and SG

  • Remarks:ObjectiveWhen is an indicator function this leads to probability objectives Many distribution based relationships Typically VaR and CVaR

    ConstraintsChance Constraints: when constraints are required to hold with a prescribed probability over a certain interval we have chance constraintsRisk Constraints can be also be accommodated VaR, CVaR, Expected ShortfallStochastic processes and SG

  • Computational systems architectureThe overall system must be able to support data modellingThat is followed by the three stage process outlined earlier:Scenario generationDecision modellingSimulation [back testing / stress testing]

  • Multistage Tree333T2Information systems architectureTree structure (number of stages, nodes, branches) defined as

  • SG IntegrationInformation systems architecture

  • OLAP and Information Value ChainInformation systems architecture

  • Generic System OverviewInformation systems architecture

  • Modelling AnalystSG2ParametersSG3ParametersSG4ParametersSG1 ParametersInterfaceScenario Set -> Parameters of Objective Function + Resource ConstraintsObjective function, 1st stage decision data -> DECISION DATAANALYTIC DATABASEABC(A(), b(), c()) SP Recourse Model SP SolverSG2SG1SG3SG4Information systems architecture

  • Scenario generation (for the approximation of distributions and stochastic processes by discretisation)Scenario generation method evaluation Solution algorithm (Benders, Lagrange, also Stochastic Decomposition methods)Evaluation of solutions (robustness of a model or the robustness of a set of decisions)Analysis of the risk associated with a given set of decisions.Information systems architecture

  • Simulation (EV, 2S, MS)Stochastic MeasuresStatisticalMeasuresRiskMeasuresInformation systems architecture

  • Computing Systems: SPInEAMLs allow to conveniently express MPs in a format both easy to understand and that can be processed by a solverSPs have different requirements, both in language constructs and in coupling with dataThe design of SAMPL extends an AML (in our case AMPL) to provide these additional constructsSPInE is the framework that deals with the second requirement (interpreting SAMPL and coupling to SGs)

  • SPInE: Modelling FrameworkScenario GeneratorModel InstanceCore ModelINPUTS

  • SPInE SG Example

  • Example: SG selection

  • Example: SG specific settings

  • SPInE Simulation and testing

  • Simulation and testingFor the in-sample stability of a Scenario Generator, we repeatedly solve the model with different instances of the SG under testThen we analyze the distribution of the objective values

  • Out of sample SG testingSG under test scenariosSolve HN ModelReal WorldscenariosResults AnalysisOptimisation modelOptimisation modelReal world scenarios is a large scenario tree, which is assumed to be the best available approximation of the stochastic processAlternative view in the next slideSolve sub-problems

  • Out of sample SG testing

  • Simulation and testingThe design of the framework to allow various kind of testing is still in progressA worlflow design seems natural:Few specialised modules Organized in a user defined way to perform potentially complex tasks

  • Case StudyALM model Optimisation

    Stochastic Measures (EVPI, VSS)

    In-Sample Stability

    Risk Measures (VaR, CVaR)

  • Model Components

  • Model Componentsvar hold{assets, scenarios, time} >=0;var hold{assets, scenarios, time} >=0;var sell{assets, scenarios, time} >=0;random param prices{assets, ... };param prodreq{timep,scenario};probability param prob{scenario};param tsell;

    NameiassetsscenarioPistPrices[assets, scenarios, timeperiod]LtsLiability[timeperiod,scenario]sprob[scenario]trSales transaction cost (%)HistAmounthold[assets, scenarios,timeperiod]BistAmountbuy[assets, scenarios,timeperiod]SistAmountsell[assets, scenarios,timeperiod]

  • An ALM Stochastic Programming ModelSurplus Wealth = assets PV(liabilities) PV(goals)carrycarryt=1t=2..T-1t=T

  • An ALM Stochastic Programming Modelsubject to fundbalance1{t in 2..T-1,s in scen}: sum{a in assets} amountbuy[t,a,s]*price[t,a,s]*tbuy-sum{a in assets} amountsell[t,a,s]*price[t,a,s]*tsell= income[t,s]-liabilities[t,s];

  • Optimisation and Stochastic MeasuresWS: 67189.4HN: 61354.4EV: 54846EEV: 60567.2

    EVPI = (WS-HN) = 5834.91774172VSS = (HN-EEV) = 787.229642443

  • Stability Measures

  • Risk Measures

    Chart1

    1100

    4944

    1343434

    283126125

    658430431

    939801799

    974970974

    121312431246

    139913421347

    120117691773

    95117051696

    542960953

    301365370

    20498

    15900

    9700

    16300

    13400

    10900

    EV

    HN(MS)

    HN(TS)

    Profit

    Frequency

    Histogram

    Graphs

    Graphs

    1100

    4944

    1343434

    283126125

    658430431

    939801799

    974970974

    121312431246

    139913421347

    120117691773

    95117051696

    542960953

    301365370

    20498

    15900

    9700

    16300

    13400

    10900

    EV

    HN(MS)

    HN(TS)

    Profit

    Frequency

    Histogram

    Sheet3

    11

    49

    134

    283

    658

    939

    974

    1213

    1399

    1201

    951

    542

    301

    204

    159

    97

    163

    134

    109

    EV

    Profit

    Frequency

    Histogram

    Simulations

    0

    4

    34

    126

    430

    801

    970

    1243

    1342

    1769

    1705

    960

    365

    9

    0

    0

    0

    0

    0

    HN(MS)

    Profit

    Frequency

    Histogram

    0

    4

    34

    125

    431

    799

    974

    1246

    1347

    1773

    1696

    953

    370

    8

    0

    0

    0

    0

    0

    HN(TS)

    Profit

    Frequency

    Histogram

    BinFrequency

    573451

    576162

    578871

    581581

    584290

    587000

    589713

    5924212

    5951332

    5978436

    More12

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    Frequency

    Scenario Generation Stability

    Input ParametersValueDescriptionSimulationsEVHN(MS)HN(TS)EVHN(MS)HN(TS)

    Scenarios50 50stage1 stage2159571.6059219131916.769262136657.515934336639.742831635022.3600142451100

    Stability Simulations:100n of sim258989.9447168232870.310848137135.584868337110.790341538127.950766394944

    VaR beta0.95Percentile359501.3027679333028.724053737809.169421937784.022489441233.5415185351343434

    VaR out of sample tree100 100out of sample sim433461.862968938092.935785738074.618881444339.13227068283126125

    Histogram points20109959461.7236502634252.203932938407.67187638389.235735550550.31377497658430431

    10060050.118546253655.904527115939801799

    999593989.828202275901.918338875884.808805756761.49527926974970974

    999694004.453146775928.56387475926.622952159867.086031405121312431246

    Optimum HN (MS)59290.1754475999794022.0030876561.931243676559.97605862972.67678355139913421347

    Optimum EV54846.1985686999894026.390563377441.993381977440.01837766078.267535695120117691773

    Optimum HN (TS)61161.2918621999994028.58430577510.157164877511.618987769183.8582878495117051696

    1000094033.33741279268.874508879266.858361772289.449039985542960953

    Var scenarios1000075395.03979213301365370

    78500.63054427520498

    EVHN (MS)HN (TS)81606.2212964215900

    VaR0.000.000.0084711.8120485659700

    CVaR66330.4159156.0359144.3987817.4028007116300

    Variance1012166067.24426140492.02426510209.5690922.99355285513400

    Mean66330.4159156.0359144.3994028.58430510900

    StabilityValue

    Min58989.9447168

    Max60050.1185462

    Range1060.1738294

    Mean59514.9391206

    stdev376.9168026175

    Relative Max Deviation1.78%

    Relative Mean Deviation0.63%

    MBD000000DC.unknown

    MBD0000016C.unknown

    MBD03DFE796.unknown

    MBD01064F71.unknown

    MBD00000128.unknown

    MBD00000048.unknown

    MBD00000090.unknown

  • ConclusionsEmergence of risk analysis has led to novel reuse of established modelling paradigms [data modelling, decison modelling, descriptive modelling]Ex-ante decisions coupled with ex-post evaluation (combined paradigm: optimisation and simulation) is a method of choice in many applications.The research challenge is to bring together :Quantitative Modelling and Financial engineering SkillsInformation Engineering SkillsAlgorithm and Software Engineering Skills

  • Thank Youhttp://carisma.brunel.ac.uk/http://www.optirisk-systems.com/

    ****************************I will present OUR SP modelling language and framework, that is constituted by the language SAMPL and the framework SPInE.For those of you that are not familiar with modelling languages, I will do a gentle introduction. ......But first, a bit of notation.

    ****************