SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Principles of Mathematical Economics applied to a
Physical-Stores Retail Business
Ashwin Rao
ICME, Stanford University
March 15, 2019
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 1 / 24
Mathematical Economics and Retail Business
Mathematical Economics is a vast and diverse area, consisting of
different flavors of Optimization and Prediction problems
We focus on a subset of these problems which are pertinent to
running a real-world Retail Business
In particular, many Retail problems involve Stochastic Optimization
... that can be viewed from the abstract lens of Mathematical Econ.
We can model these as Markov Decision Processes, eg:
How to Supply optimally given random demand and cost structures
How to Price optimally given random demand and supply
Retail also involves forecasting problems, eg: Demand Forecasting
... as well as optimization problems on strategy/planning/scheduling
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 2 / 24
Inventory Control
A fundamental problem in Retail is Inventory Control
How to move inventory optimally from suppliers to shoppers
Let us view this from the lens of Mathematical Economics
Abstracting to a Supply ⇒ Demand optimization problem
Nirvana is when Supply appears “just in time” to satisfy demand
We start with an exposition of two classical simple problems:
Economic Order Quantity (EOQ) problem
Newsvendor problem
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 3 / 24
Economic Order Quantity (EOQ)
Assumption: Demand for an item is at a constant rate of µ units/year
Note the big assumption of deterministic demand
A new order is delivered in full when inventory reaches 0
Fixed cost K for each order of non-zero units
Holding cost h/unit/year for storage in store
What is the optimal number of units to order?
To minimize the annual cost of ordering + storage
Note: Deterministic Demand is often an unreasonable assumption
But EOQ is a useful foundation to build intuition
Many extensions to EOQ (eg: EOQ for Perishables)
EOQ concept goes beyond Retail (foundation in Mathematical Econ.)
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 4 / 24
Solving EOQ
Assume Q is the order quantity (Q∗ is optimal order quantity)
Then we order at annual frequency µ
Q (Period Q
µ )
Annual Ordering Cost is µK
Q
Annual Holding Cost is hQ
2 (note: average inventory during year is Q
2 )
Annual Total Cost is:
µK
Q
+
hQ
2
Taking derivative w.r.t. Q and setting it to 0 yields:
Q∗
=
2µK
h
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 5 / 24
Newsvendor Problem
Daily demand for newspapers is a random variable x
The newsvendor has an estimate of the PDF f (x) of daily demand
For each newspaper that stays unsold, we suffer a Holding Cost h
Think of h as the purchase price minus salvage price
For each newspaper we’re short on, we suffer a Stockout Cost p
Think of p as the missed profits (sale price minus purchase price)
But p should also include potential loss of future customers
What is the optimum # of newspapers to bring in the morning?
To minimize the expected cost (function of f , h and p)
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 6 / 24
Newsvendor Problem
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 7 / 24
Solution to the Newsvendor problem
For tractability, we assume newspapers are a continuous variable x
Then, we need to solve for the optimal supply S that maximizes
g(S) = h
S
0
(S − x) · f (x) · dx + p
∞
S
(x − S) · f (x) · dx
Setting g (S) = 0, we get:
Optimal Supply S∗
= F−1
(
p
p + h
)
where F(y) =
y
0 f (x)dx is the CDF of daily demand
p
p+h is known as the critical fractile
It is the fraction of days when the newsvendor goes “out-of-stock”
Assuming the newsvendor always brings this optimal supply S∗
Solution details and connections with Financial Options Pricing here
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 8 / 24
Single-store, Single-item Inventory Control
The store experiences random daily demand given by PDF f (x)
The store can order daily from a supplier carrying infinite inventory
There’s a cost associated with ordering, and order arrives in L days
Like newsvendor, there’s a Holding Cost h and Stockout Cost p
This is an MDP where State is current Inventory Level at the store
State also includes current in-transit inventory (from supplier)
Action is quantity to order in any given State
Reward function has h, p (just like newsvendor), and ordering cost
Transition probabilities are governed by demand distribution f (x)
This has a closed-form solution, similar to newsvendor fomula
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 9 / 24
Optimal Ordering Policy
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 10 / 24
The Core of Textbook Problem has this Pictorial Intuition
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 11 / 24
Costs viewed against End-of-Day Inventory
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 12 / 24
UnderCapacity and OverCapacity Costs
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 13 / 24
UnderCapacity Cost: Customer Psychology and Economics
Retail Mantra: “Stack it high and watch it fly”
Customers like to see shelves well stocked
Visual emptiness is known to be a sales deterrent
So, full-looking shelves are part of presentation strategy
At a certain level of emptiness, the deterrent rises sharply
Hence the convex nature of this cost curve
Note that this curve varies from item to item
It also varies from regular season to end of season
Modeling/calibrating this is tricky!
However, getting a basic model in place is vital
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 14 / 24
OverCapacity Cost: Backroom Space Constraints
Retail store backrooms have limited capacity
Typically tens of thousands of items compete for this space
Retailers like to have clean and organized backrooms
A perfect model is when all your inventory is on store shelves
With backroom used purely as a hub for home deliveries
Practically, some overflow from shelves is unavoidable
Hence, the convex nature of this curve
Modeling this is hard because it’s a multi-item cost/constraint
Again, getting a basic model in place is vital
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 15 / 24
What other costs are involved?
Holding Cost: Interest on Inventory, Superficial Damage, Maintenance
Stockout Cost: Lost Sales, sometimes Lost Customers
Labor Cost: Replenishment involves movement from truck to shelf
Spoilage Cost: Food & Beverages can have acute perishability
End-of-Season/Obsolescence Cost: Intersects with Clearance Pricing
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 16 / 24
Practical Inventory Control as a Markov Decision Process
The store experiences random daily demand
The store can place a replenishment order in casepack mutiples
This is an MDP where State is current Inventory Level at the store
State also includes current in-transit inventory (from warehouse)
Action is the multiple of casepack to order (or not order)
Reward function involves all of the costs we went over earlier
State transitions governed by demand probability distribution
Solve: Dynamic Programming or Reinforcement Learning Algorithms
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 17 / 24
Multi-node and Multi-item Inventory Control
In practice, Inventory flows through a network of warehouses
From source (suppliers) to destination (stores or homes)
So, we have to solve a multi-“node” Inventory Control problem
State is joint inventory across all nodes (and between nodes)
Action is recommended movements of inventory between nodes
Reward is the aggregate of daily costs across the network
Space and Throughput constraints are multi-item costs/constraints
So, real-world problem is multi-node and multi-item (giant MDP)
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 18 / 24
Clearance Pricing
You are a few weeks away from end-of-season (eg: Christmas Trees)
Assume you have too much inventory in your store
What is the optimal sequence of price markdowns?
Under (uncertain) demand responding to markdowns
So as to maximize your total profit (sales revenue minus costs)
Note: There is a non-trivial cost of performing a markdown
If price markdowns are small, we end up with surplus at season-end
Surplus often needs to be disposed at poor salvage price
If price reductions are large, we run out of Christmas trees early
“Stockout” cost is considered to be large during holiday season
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 19 / 24
MDP for Clearance Pricing
State is [Days Left, Current Inventory, Current Price, Market Info]
Action is Price Markdown
Reward includes Sales revenue, markdown cost, stockout cost, salvage
Reward & State-transitions governed by Price Elasticity of Demand
Real-world Model can be quite complex (eg: competitor pricing)
Ambitious Idea: Blend Inventory and Price Control into one MDP
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 20 / 24
Perspective from the Trenches (to solve real-world MDPs)
I always start with a simple version of problem to develop intuition
My first line of attack is DP customized to the problem structure
RL Algorithms that are my personal favorites (links to lectures):
Deep Q-Network (DQN): Experience Replay, 2nd Target Network
Least Squares Policy Iteration (LSPI) - Batch Linear System
Exact Gradient Temporal-Difference (GTD)
Policy Gradient (esp. Natural Gradient, TRPO)
Separate Model Estimation from Policy Optimization
So we could customize RL algorithms to take advantage of:
Knowledge of transition probabilities
Knowledge of reward function
Any problem-specific structure that simplifies the algorithm
Feature Engineering based on known closed-form approximations
Many real-world, large-scale problems ultimately come down to
suitable choices of DNN architectures and hyperparameter tuning
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 21 / 24
Inputs to these MDPs (other than the costs)
Daily Demand Forecast probability distribution function
Shelf Capacity
Casepack size
Lead Time (time from replenishment order to arrival on shelf)
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 22 / 24
Where do these inputs come from?
From solutions to various other Forecasting and Planning problems
Demand Forecasting is a supervised learning problem (DNNs!)
Planning problems are Optimization problems
Some Planning Problems:
Assortment Selection
Shelf-size Planning
Casepack Sizing
Network Planning (for Lead Time)
Labor Planning
Some planning problems need as input solution to Inventory Control
How do we resolve this Chicken-and-egg situation?
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 23 / 24
The Fixed-Point of Planning and Control
Planning problems are optimizations over parameter choices p
For example, a set of Shelf-size choices or casepack choices
Denote the Inventory Control MDP as Dp (p is input to MDP)
Denote the Solution (Optimal Policy) to Dp as π∗
p
Solve the planning problems (optimization) with input π∗
p
The solution is the optimal parameter set p∗
Feed p∗ back into the MDP to solve for policy π∗
p∗
Iterate this until we get stable p∗ and π∗
p∗
Very important to design the interfaces consistently
Clean software framework for overall system design is vital to success
Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 24 / 24

Contenu connexe

Tendances

Bba 1584 planning n forecasting
Bba 1584 planning n forecastingBba 1584 planning n forecasting
Bba 1584 planning n forecastinglecturer-notes2014
 
Class notes forecasting
Class notes forecastingClass notes forecasting
Class notes forecastingArun Kumar
 
Forecasting and methods of forecasting
Forecasting and methods of forecastingForecasting and methods of forecasting
Forecasting and methods of forecastingMilind Pelagade
 
Formulation of Predictive and Positive theory
Formulation of Predictive and Positive theoryFormulation of Predictive and Positive theory
Formulation of Predictive and Positive theoryAsmita Nagpal
 
FORECASTING
FORECASTINGFORECASTING
FORECASTINGkzoe1996
 
Stock Return Forecast - Theory and Empirical Evidence
Stock Return Forecast - Theory and Empirical EvidenceStock Return Forecast - Theory and Empirical Evidence
Stock Return Forecast - Theory and Empirical EvidenceTai Tran
 
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C..."Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...Quantopian
 
Arbitrage pricing theory & Efficient market hypothesis
Arbitrage pricing theory & Efficient market hypothesisArbitrage pricing theory & Efficient market hypothesis
Arbitrage pricing theory & Efficient market hypothesisHari Ram
 
Quantitative methods of demand forecasting
Quantitative methods of demand forecastingQuantitative methods of demand forecasting
Quantitative methods of demand forecastinganithagrahalakshmi
 
ForecastIT 1. Introduction to Forecasting
ForecastIT 1. Introduction to ForecastingForecastIT 1. Introduction to Forecasting
ForecastIT 1. Introduction to ForecastingDeepThought, Inc.
 
Presentation 2
Presentation 2Presentation 2
Presentation 2uliana8
 
Forecasting
ForecastingForecasting
ForecastingSVGANGAD
 
Automatic algorithms for time series forecasting
Automatic algorithms for time series forecastingAutomatic algorithms for time series forecasting
Automatic algorithms for time series forecastingRob Hyndman
 

Tendances (20)

Demand forecasting 12
Demand forecasting 12Demand forecasting 12
Demand forecasting 12
 
demand forecasting
demand forecastingdemand forecasting
demand forecasting
 
Forecasting
ForecastingForecasting
Forecasting
 
Bba 1584 planning n forecasting
Bba 1584 planning n forecastingBba 1584 planning n forecasting
Bba 1584 planning n forecasting
 
Class notes forecasting
Class notes forecastingClass notes forecasting
Class notes forecasting
 
Forecasting and methods of forecasting
Forecasting and methods of forecastingForecasting and methods of forecasting
Forecasting and methods of forecasting
 
Forecasting model 15 04-31
Forecasting model 15 04-31Forecasting model 15 04-31
Forecasting model 15 04-31
 
Formulation of Predictive and Positive theory
Formulation of Predictive and Positive theoryFormulation of Predictive and Positive theory
Formulation of Predictive and Positive theory
 
forecasting methods
forecasting methodsforecasting methods
forecasting methods
 
Demand forecasting
Demand forecastingDemand forecasting
Demand forecasting
 
FORECASTING
FORECASTINGFORECASTING
FORECASTING
 
Stock Return Forecast - Theory and Empirical Evidence
Stock Return Forecast - Theory and Empirical EvidenceStock Return Forecast - Theory and Empirical Evidence
Stock Return Forecast - Theory and Empirical Evidence
 
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C..."Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
 
Arbitrage pricing theory & Efficient market hypothesis
Arbitrage pricing theory & Efficient market hypothesisArbitrage pricing theory & Efficient market hypothesis
Arbitrage pricing theory & Efficient market hypothesis
 
Quantitative methods of demand forecasting
Quantitative methods of demand forecastingQuantitative methods of demand forecasting
Quantitative methods of demand forecasting
 
Trend analysis
Trend analysisTrend analysis
Trend analysis
 
ForecastIT 1. Introduction to Forecasting
ForecastIT 1. Introduction to ForecastingForecastIT 1. Introduction to Forecasting
ForecastIT 1. Introduction to Forecasting
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
 
Forecasting
ForecastingForecasting
Forecasting
 
Automatic algorithms for time series forecasting
Automatic algorithms for time series forecastingAutomatic algorithms for time series forecasting
Automatic algorithms for time series forecasting
 

Similaire à Principles of Mathematical Economics applied to a Physical-Stores Retail Business

Retailmerchandisebudgetplannng
RetailmerchandisebudgetplannngRetailmerchandisebudgetplannng
Retailmerchandisebudgetplannngbaabul
 
Session 3
Session 3Session 3
Session 3thangv
 
Introduction to Managerial Economics.pptx
Introduction to Managerial Economics.pptxIntroduction to Managerial Economics.pptx
Introduction to Managerial Economics.pptxmarvin173254
 
Demand Forecast & Production Planning Industrial engineering management E-Book
Demand Forecast & Production Planning Industrial engineering management  E-BookDemand Forecast & Production Planning Industrial engineering management  E-Book
Demand Forecast & Production Planning Industrial engineering management E-BookLuis Cabrera
 
Week 9- Supply Chain- Short Term Decisions Lesson Files.pdf
Week 9- Supply Chain- Short Term Decisions Lesson Files.pdfWeek 9- Supply Chain- Short Term Decisions Lesson Files.pdf
Week 9- Supply Chain- Short Term Decisions Lesson Files.pdfAbdullahGhazal5
 
ch5 Managing Materials Flow.pptx
ch5 Managing Materials Flow.pptxch5 Managing Materials Flow.pptx
ch5 Managing Materials Flow.pptxKaythisoe3
 
How to become world class business analyst
How to become world class business analystHow to become world class business analyst
How to become world class business analystAsen Gyczew
 
Essential Management Consulting Tools, Techniques and Frameworks
Essential Management Consulting Tools, Techniques and FrameworksEssential Management Consulting Tools, Techniques and Frameworks
Essential Management Consulting Tools, Techniques and FrameworksAsen Gyczew
 
MANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAIN
MANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAINMANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAIN
MANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAINAshish Hande
 
Retailmerchandisebudgetplannng
RetailmerchandisebudgetplannngRetailmerchandisebudgetplannng
Retailmerchandisebudgetplannngsunil mehra
 
Inventory Policy Decisions Deepa
Inventory Policy Decisions DeepaInventory Policy Decisions Deepa
Inventory Policy Decisions DeepaTICS
 
Om0010 operations management
Om0010   operations managementOm0010   operations management
Om0010 operations managementsmumbahelp
 
Ch10 supp.chain+strategy
Ch10 supp.chain+strategyCh10 supp.chain+strategy
Ch10 supp.chain+strategyvideoaakash15
 
Demand planning and inventories strategy
Demand planning and inventories strategyDemand planning and inventories strategy
Demand planning and inventories strategyLuis Cabrera
 
Sc0009 supply chain cost management
Sc0009 supply chain cost managementSc0009 supply chain cost management
Sc0009 supply chain cost managementsmumbahelp
 

Similaire à Principles of Mathematical Economics applied to a Physical-Stores Retail Business (20)

Retailmerchandisebudgetplannng
RetailmerchandisebudgetplannngRetailmerchandisebudgetplannng
Retailmerchandisebudgetplannng
 
Session 3
Session 3Session 3
Session 3
 
Introduction to Managerial Economics.pptx
Introduction to Managerial Economics.pptxIntroduction to Managerial Economics.pptx
Introduction to Managerial Economics.pptx
 
Demand Forecast & Production Planning Industrial engineering management E-Book
Demand Forecast & Production Planning Industrial engineering management  E-BookDemand Forecast & Production Planning Industrial engineering management  E-Book
Demand Forecast & Production Planning Industrial engineering management E-Book
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Week 9- Supply Chain- Short Term Decisions Lesson Files.pdf
Week 9- Supply Chain- Short Term Decisions Lesson Files.pdfWeek 9- Supply Chain- Short Term Decisions Lesson Files.pdf
Week 9- Supply Chain- Short Term Decisions Lesson Files.pdf
 
ch5 Managing Materials Flow.pptx
ch5 Managing Materials Flow.pptxch5 Managing Materials Flow.pptx
ch5 Managing Materials Flow.pptx
 
How to become world class business analyst
How to become world class business analystHow to become world class business analyst
How to become world class business analyst
 
Essential Management Consulting Tools, Techniques and Frameworks
Essential Management Consulting Tools, Techniques and FrameworksEssential Management Consulting Tools, Techniques and Frameworks
Essential Management Consulting Tools, Techniques and Frameworks
 
MANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAIN
MANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAINMANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAIN
MANAGEMENT INVENTORY FLOWS IN THE SUPPLY CHAIN
 
Retailmerchandisebudgetplannng
RetailmerchandisebudgetplannngRetailmerchandisebudgetplannng
Retailmerchandisebudgetplannng
 
Inventory Policy Decisions Deepa
Inventory Policy Decisions DeepaInventory Policy Decisions Deepa
Inventory Policy Decisions Deepa
 
Business mathematic
Business mathematicBusiness mathematic
Business mathematic
 
Om0010 operations management
Om0010   operations managementOm0010   operations management
Om0010 operations management
 
Ch10 supp.chain+strategy
Ch10 supp.chain+strategyCh10 supp.chain+strategy
Ch10 supp.chain+strategy
 
Demand planning and inventories strategy
Demand planning and inventories strategyDemand planning and inventories strategy
Demand planning and inventories strategy
 
Cost analysis for entrepreneurs
Cost analysis for entrepreneurs Cost analysis for entrepreneurs
Cost analysis for entrepreneurs
 
Cost analysis for entrepreneurs
Cost analysis for entrepreneurs Cost analysis for entrepreneurs
Cost analysis for entrepreneurs
 
Supply Chain Risk Management
Supply Chain Risk ManagementSupply Chain Risk Management
Supply Chain Risk Management
 
Sc0009 supply chain cost management
Sc0009 supply chain cost managementSc0009 supply chain cost management
Sc0009 supply chain cost management
 

Plus de Ashwin Rao

Stochastic Control/Reinforcement Learning for Optimal Market Making
Stochastic Control/Reinforcement Learning for Optimal Market MakingStochastic Control/Reinforcement Learning for Optimal Market Making
Stochastic Control/Reinforcement Learning for Optimal Market MakingAshwin Rao
 
Adaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree Search
Adaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree SearchAdaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree Search
Adaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree SearchAshwin Rao
 
Fundamental Theorems of Asset Pricing
Fundamental Theorems of Asset PricingFundamental Theorems of Asset Pricing
Fundamental Theorems of Asset PricingAshwin Rao
 
Evolutionary Strategies as an alternative to Reinforcement Learning
Evolutionary Strategies as an alternative to Reinforcement LearningEvolutionary Strategies as an alternative to Reinforcement Learning
Evolutionary Strategies as an alternative to Reinforcement LearningAshwin Rao
 
Understanding Dynamic Programming through Bellman Operators
Understanding Dynamic Programming through Bellman OperatorsUnderstanding Dynamic Programming through Bellman Operators
Understanding Dynamic Programming through Bellman OperatorsAshwin Rao
 
Stochastic Control of Optimal Trade Order Execution
Stochastic Control of Optimal Trade Order ExecutionStochastic Control of Optimal Trade Order Execution
Stochastic Control of Optimal Trade Order ExecutionAshwin Rao
 
Overview of Stochastic Calculus Foundations
Overview of Stochastic Calculus FoundationsOverview of Stochastic Calculus Foundations
Overview of Stochastic Calculus FoundationsAshwin Rao
 
Risk-Aversion, Risk-Premium and Utility Theory
Risk-Aversion, Risk-Premium and Utility TheoryRisk-Aversion, Risk-Premium and Utility Theory
Risk-Aversion, Risk-Premium and Utility TheoryAshwin Rao
 
Value Function Geometry and Gradient TD
Value Function Geometry and Gradient TDValue Function Geometry and Gradient TD
Value Function Geometry and Gradient TDAshwin Rao
 
HJB Equation and Merton's Portfolio Problem
HJB Equation and Merton's Portfolio ProblemHJB Equation and Merton's Portfolio Problem
HJB Equation and Merton's Portfolio ProblemAshwin Rao
 
Policy Gradient Theorem
Policy Gradient TheoremPolicy Gradient Theorem
Policy Gradient TheoremAshwin Rao
 
A Quick and Terse Introduction to Efficient Frontier Mathematics
A Quick and Terse Introduction to Efficient Frontier MathematicsA Quick and Terse Introduction to Efficient Frontier Mathematics
A Quick and Terse Introduction to Efficient Frontier MathematicsAshwin Rao
 
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural Network
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural NetworkRecursive Formulation of Gradient in a Dense Feed-Forward Deep Neural Network
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural NetworkAshwin Rao
 
Demystifying the Bias-Variance Tradeoff
Demystifying the Bias-Variance TradeoffDemystifying the Bias-Variance Tradeoff
Demystifying the Bias-Variance TradeoffAshwin Rao
 
Category Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesCategory Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesAshwin Rao
 
Risk Pooling sensitivity to Correlation
Risk Pooling sensitivity to CorrelationRisk Pooling sensitivity to Correlation
Risk Pooling sensitivity to CorrelationAshwin Rao
 
Abstract Algebra in 3 Hours
Abstract Algebra in 3 HoursAbstract Algebra in 3 Hours
Abstract Algebra in 3 HoursAshwin Rao
 
OmniChannelNewsvendor
OmniChannelNewsvendorOmniChannelNewsvendor
OmniChannelNewsvendorAshwin Rao
 
The Newsvendor meets the Options Trader
The Newsvendor meets the Options TraderThe Newsvendor meets the Options Trader
The Newsvendor meets the Options TraderAshwin Rao
 
The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||Ashwin Rao
 

Plus de Ashwin Rao (20)

Stochastic Control/Reinforcement Learning for Optimal Market Making
Stochastic Control/Reinforcement Learning for Optimal Market MakingStochastic Control/Reinforcement Learning for Optimal Market Making
Stochastic Control/Reinforcement Learning for Optimal Market Making
 
Adaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree Search
Adaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree SearchAdaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree Search
Adaptive Multistage Sampling Algorithm: The Origins of Monte Carlo Tree Search
 
Fundamental Theorems of Asset Pricing
Fundamental Theorems of Asset PricingFundamental Theorems of Asset Pricing
Fundamental Theorems of Asset Pricing
 
Evolutionary Strategies as an alternative to Reinforcement Learning
Evolutionary Strategies as an alternative to Reinforcement LearningEvolutionary Strategies as an alternative to Reinforcement Learning
Evolutionary Strategies as an alternative to Reinforcement Learning
 
Understanding Dynamic Programming through Bellman Operators
Understanding Dynamic Programming through Bellman OperatorsUnderstanding Dynamic Programming through Bellman Operators
Understanding Dynamic Programming through Bellman Operators
 
Stochastic Control of Optimal Trade Order Execution
Stochastic Control of Optimal Trade Order ExecutionStochastic Control of Optimal Trade Order Execution
Stochastic Control of Optimal Trade Order Execution
 
Overview of Stochastic Calculus Foundations
Overview of Stochastic Calculus FoundationsOverview of Stochastic Calculus Foundations
Overview of Stochastic Calculus Foundations
 
Risk-Aversion, Risk-Premium and Utility Theory
Risk-Aversion, Risk-Premium and Utility TheoryRisk-Aversion, Risk-Premium and Utility Theory
Risk-Aversion, Risk-Premium and Utility Theory
 
Value Function Geometry and Gradient TD
Value Function Geometry and Gradient TDValue Function Geometry and Gradient TD
Value Function Geometry and Gradient TD
 
HJB Equation and Merton's Portfolio Problem
HJB Equation and Merton's Portfolio ProblemHJB Equation and Merton's Portfolio Problem
HJB Equation and Merton's Portfolio Problem
 
Policy Gradient Theorem
Policy Gradient TheoremPolicy Gradient Theorem
Policy Gradient Theorem
 
A Quick and Terse Introduction to Efficient Frontier Mathematics
A Quick and Terse Introduction to Efficient Frontier MathematicsA Quick and Terse Introduction to Efficient Frontier Mathematics
A Quick and Terse Introduction to Efficient Frontier Mathematics
 
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural Network
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural NetworkRecursive Formulation of Gradient in a Dense Feed-Forward Deep Neural Network
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural Network
 
Demystifying the Bias-Variance Tradeoff
Demystifying the Bias-Variance TradeoffDemystifying the Bias-Variance Tradeoff
Demystifying the Bias-Variance Tradeoff
 
Category Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesCategory Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) pictures
 
Risk Pooling sensitivity to Correlation
Risk Pooling sensitivity to CorrelationRisk Pooling sensitivity to Correlation
Risk Pooling sensitivity to Correlation
 
Abstract Algebra in 3 Hours
Abstract Algebra in 3 HoursAbstract Algebra in 3 Hours
Abstract Algebra in 3 Hours
 
OmniChannelNewsvendor
OmniChannelNewsvendorOmniChannelNewsvendor
OmniChannelNewsvendor
 
The Newsvendor meets the Options Trader
The Newsvendor meets the Options TraderThe Newsvendor meets the Options Trader
The Newsvendor meets the Options Trader
 
The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||
 

Principles of Mathematical Economics applied to a Physical-Stores Retail Business

  • 1. Principles of Mathematical Economics applied to a Physical-Stores Retail Business Ashwin Rao ICME, Stanford University March 15, 2019 Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 1 / 24
  • 2. Mathematical Economics and Retail Business Mathematical Economics is a vast and diverse area, consisting of different flavors of Optimization and Prediction problems We focus on a subset of these problems which are pertinent to running a real-world Retail Business In particular, many Retail problems involve Stochastic Optimization ... that can be viewed from the abstract lens of Mathematical Econ. We can model these as Markov Decision Processes, eg: How to Supply optimally given random demand and cost structures How to Price optimally given random demand and supply Retail also involves forecasting problems, eg: Demand Forecasting ... as well as optimization problems on strategy/planning/scheduling Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 2 / 24
  • 3. Inventory Control A fundamental problem in Retail is Inventory Control How to move inventory optimally from suppliers to shoppers Let us view this from the lens of Mathematical Economics Abstracting to a Supply ⇒ Demand optimization problem Nirvana is when Supply appears “just in time” to satisfy demand We start with an exposition of two classical simple problems: Economic Order Quantity (EOQ) problem Newsvendor problem Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 3 / 24
  • 4. Economic Order Quantity (EOQ) Assumption: Demand for an item is at a constant rate of µ units/year Note the big assumption of deterministic demand A new order is delivered in full when inventory reaches 0 Fixed cost K for each order of non-zero units Holding cost h/unit/year for storage in store What is the optimal number of units to order? To minimize the annual cost of ordering + storage Note: Deterministic Demand is often an unreasonable assumption But EOQ is a useful foundation to build intuition Many extensions to EOQ (eg: EOQ for Perishables) EOQ concept goes beyond Retail (foundation in Mathematical Econ.) Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 4 / 24
  • 5. Solving EOQ Assume Q is the order quantity (Q∗ is optimal order quantity) Then we order at annual frequency µ Q (Period Q µ ) Annual Ordering Cost is µK Q Annual Holding Cost is hQ 2 (note: average inventory during year is Q 2 ) Annual Total Cost is: µK Q + hQ 2 Taking derivative w.r.t. Q and setting it to 0 yields: Q∗ = 2µK h Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 5 / 24
  • 6. Newsvendor Problem Daily demand for newspapers is a random variable x The newsvendor has an estimate of the PDF f (x) of daily demand For each newspaper that stays unsold, we suffer a Holding Cost h Think of h as the purchase price minus salvage price For each newspaper we’re short on, we suffer a Stockout Cost p Think of p as the missed profits (sale price minus purchase price) But p should also include potential loss of future customers What is the optimum # of newspapers to bring in the morning? To minimize the expected cost (function of f , h and p) Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 6 / 24
  • 7. Newsvendor Problem Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 7 / 24
  • 8. Solution to the Newsvendor problem For tractability, we assume newspapers are a continuous variable x Then, we need to solve for the optimal supply S that maximizes g(S) = h S 0 (S − x) · f (x) · dx + p ∞ S (x − S) · f (x) · dx Setting g (S) = 0, we get: Optimal Supply S∗ = F−1 ( p p + h ) where F(y) = y 0 f (x)dx is the CDF of daily demand p p+h is known as the critical fractile It is the fraction of days when the newsvendor goes “out-of-stock” Assuming the newsvendor always brings this optimal supply S∗ Solution details and connections with Financial Options Pricing here Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 8 / 24
  • 9. Single-store, Single-item Inventory Control The store experiences random daily demand given by PDF f (x) The store can order daily from a supplier carrying infinite inventory There’s a cost associated with ordering, and order arrives in L days Like newsvendor, there’s a Holding Cost h and Stockout Cost p This is an MDP where State is current Inventory Level at the store State also includes current in-transit inventory (from supplier) Action is quantity to order in any given State Reward function has h, p (just like newsvendor), and ordering cost Transition probabilities are governed by demand distribution f (x) This has a closed-form solution, similar to newsvendor fomula Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 9 / 24
  • 10. Optimal Ordering Policy Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 10 / 24
  • 11. The Core of Textbook Problem has this Pictorial Intuition Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 11 / 24
  • 12. Costs viewed against End-of-Day Inventory Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 12 / 24
  • 13. UnderCapacity and OverCapacity Costs Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 13 / 24
  • 14. UnderCapacity Cost: Customer Psychology and Economics Retail Mantra: “Stack it high and watch it fly” Customers like to see shelves well stocked Visual emptiness is known to be a sales deterrent So, full-looking shelves are part of presentation strategy At a certain level of emptiness, the deterrent rises sharply Hence the convex nature of this cost curve Note that this curve varies from item to item It also varies from regular season to end of season Modeling/calibrating this is tricky! However, getting a basic model in place is vital Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 14 / 24
  • 15. OverCapacity Cost: Backroom Space Constraints Retail store backrooms have limited capacity Typically tens of thousands of items compete for this space Retailers like to have clean and organized backrooms A perfect model is when all your inventory is on store shelves With backroom used purely as a hub for home deliveries Practically, some overflow from shelves is unavoidable Hence, the convex nature of this curve Modeling this is hard because it’s a multi-item cost/constraint Again, getting a basic model in place is vital Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 15 / 24
  • 16. What other costs are involved? Holding Cost: Interest on Inventory, Superficial Damage, Maintenance Stockout Cost: Lost Sales, sometimes Lost Customers Labor Cost: Replenishment involves movement from truck to shelf Spoilage Cost: Food & Beverages can have acute perishability End-of-Season/Obsolescence Cost: Intersects with Clearance Pricing Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 16 / 24
  • 17. Practical Inventory Control as a Markov Decision Process The store experiences random daily demand The store can place a replenishment order in casepack mutiples This is an MDP where State is current Inventory Level at the store State also includes current in-transit inventory (from warehouse) Action is the multiple of casepack to order (or not order) Reward function involves all of the costs we went over earlier State transitions governed by demand probability distribution Solve: Dynamic Programming or Reinforcement Learning Algorithms Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 17 / 24
  • 18. Multi-node and Multi-item Inventory Control In practice, Inventory flows through a network of warehouses From source (suppliers) to destination (stores or homes) So, we have to solve a multi-“node” Inventory Control problem State is joint inventory across all nodes (and between nodes) Action is recommended movements of inventory between nodes Reward is the aggregate of daily costs across the network Space and Throughput constraints are multi-item costs/constraints So, real-world problem is multi-node and multi-item (giant MDP) Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 18 / 24
  • 19. Clearance Pricing You are a few weeks away from end-of-season (eg: Christmas Trees) Assume you have too much inventory in your store What is the optimal sequence of price markdowns? Under (uncertain) demand responding to markdowns So as to maximize your total profit (sales revenue minus costs) Note: There is a non-trivial cost of performing a markdown If price markdowns are small, we end up with surplus at season-end Surplus often needs to be disposed at poor salvage price If price reductions are large, we run out of Christmas trees early “Stockout” cost is considered to be large during holiday season Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 19 / 24
  • 20. MDP for Clearance Pricing State is [Days Left, Current Inventory, Current Price, Market Info] Action is Price Markdown Reward includes Sales revenue, markdown cost, stockout cost, salvage Reward & State-transitions governed by Price Elasticity of Demand Real-world Model can be quite complex (eg: competitor pricing) Ambitious Idea: Blend Inventory and Price Control into one MDP Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 20 / 24
  • 21. Perspective from the Trenches (to solve real-world MDPs) I always start with a simple version of problem to develop intuition My first line of attack is DP customized to the problem structure RL Algorithms that are my personal favorites (links to lectures): Deep Q-Network (DQN): Experience Replay, 2nd Target Network Least Squares Policy Iteration (LSPI) - Batch Linear System Exact Gradient Temporal-Difference (GTD) Policy Gradient (esp. Natural Gradient, TRPO) Separate Model Estimation from Policy Optimization So we could customize RL algorithms to take advantage of: Knowledge of transition probabilities Knowledge of reward function Any problem-specific structure that simplifies the algorithm Feature Engineering based on known closed-form approximations Many real-world, large-scale problems ultimately come down to suitable choices of DNN architectures and hyperparameter tuning Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 21 / 24
  • 22. Inputs to these MDPs (other than the costs) Daily Demand Forecast probability distribution function Shelf Capacity Casepack size Lead Time (time from replenishment order to arrival on shelf) Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 22 / 24
  • 23. Where do these inputs come from? From solutions to various other Forecasting and Planning problems Demand Forecasting is a supervised learning problem (DNNs!) Planning problems are Optimization problems Some Planning Problems: Assortment Selection Shelf-size Planning Casepack Sizing Network Planning (for Lead Time) Labor Planning Some planning problems need as input solution to Inventory Control How do we resolve this Chicken-and-egg situation? Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 23 / 24
  • 24. The Fixed-Point of Planning and Control Planning problems are optimizations over parameter choices p For example, a set of Shelf-size choices or casepack choices Denote the Inventory Control MDP as Dp (p is input to MDP) Denote the Solution (Optimal Policy) to Dp as π∗ p Solve the planning problems (optimization) with input π∗ p The solution is the optimal parameter set p∗ Feed p∗ back into the MDP to solve for policy π∗ p∗ Iterate this until we get stable p∗ and π∗ p∗ Very important to design the interfaces consistently Clean software framework for overall system design is vital to success Ashwin Rao (Stanford) Mathematical Economics for Retail March 15, 2019 24 / 24