This project develops a stylized operations research model for allocating foreign direct investment across middle-income countries.
The project starts from country-level economic and institutional indicators and builds a sequence of increasingly complex allocation models. The aim is to compare how investment portfolios change when the decision-maker follows a private-investor logic, a development-finance logic, or a policy-constrained optimization logic.
The project is organized around three main steps:
- Construction of country-level indicators and scores.
- Optimization of investment allocations under different decision-making logics.
- Comparison of portfolio outcomes across models.
The analysis focuses on three portfolio-level dimensions:
- investment readiness;
- capital-scarcity need;
- risk.
The final comparison shows how different objectives and constraints affect both portfolio scores and the geographical distribution of investment.
The project includes three allocation models.
The private investor model allocates capital by maximizing a risk-adjusted investment score:
private_score = readiness_score - λ × risk_score
Three levels of risk aversion are considered:
low risk aversion; moderate risk aversion; high risk aversion.
This model provides a market-oriented benchmark.
The development finance model introduces capital-scarcity need directly into the objective function:
development_score = w_readiness × readiness_score + w_need × need_score - w_risk × risk_score
Three strategies are considered:
balanced; need-oriented; feasibility-oriented.
The model is solved both with and without a minimum portfolio-level need constraint.
The final model is a mixed-integer linear programming model. It combines a development-oriented objective with explicit portfolio constraints.
The objective maximizes an absorptive development score:
absorptive_development_score = readiness_score × need_score - 0.25 × risk_score
The multiplicative term captures the idea that capital-scarcity need and investment readiness are complementary: a country is more attractive for policy-oriented allocation when it combines high need with sufficient absorptive capacity.
The model includes:
minimum and maximum country allocations; binary country selection variables; regional activation constraints; regional budget limits; minimum allocation to high-need countries; minimum portfolio readiness; maximum portfolio risk.
This model represents the most realistic and institutionally constrained allocation framework in the project.
fdi-allocation-optimization/ │ ├── data/ │ ├── raw/ │ └── processed/ │ ├── notebooks/ │ ├── 01_build_country_indicators.ipynb │ ├── 02_scoring_model.ipynb │ ├── 03_private_investor_allocation.ipynb │ ├── 04_development_finance_allocation.ipynb │ ├── 05_policy_constrained_portfolio_optimization.ipynb │ └── 06_model_comparison.ipynb │ ├── outputs/ │ ├── figures/ │ └── tables/ │ ├── methodology.md ├── requirements.txt └── README.md
The notebooks should be run in numerical order.
-
01_build_country_indicators.ipynb
Builds country-level indicators from the raw panel dataset. -
02_scoring_model.ipynb
Constructs readiness, capital-scarcity need, and risk scores. -
03_private_investor_allocation.ipynb
Solves the private-investor allocation model. -
04_development_finance_allocation.ipynb
Solves the development-finance allocation model. -
05_policy_constrained_portfolio_optimization.ipynb
Solves the policy-constrained MILP model. -
06_model_comparison.ipynb
Compares portfolio outcomes across models.
The project produces both tables and figures.
- country indicators dataset;
- country scores dataset;
- private-investor allocation comparison;
- private-investor portfolio metrics;
- development-finance allocation comparison;
- development-finance portfolio metrics;
- policy-constrained selected portfolio;
- policy-constrained regional summary;
- policy-constrained portfolio metrics;
- policy-constrained constraint check;
- model comparison metrics;
- regional allocation comparison.
- portfolio score comparison;
- regional allocation comparison.
- country indicators dataset;
- country scores dataset;
The project uses Python and the following main packages:
pandas pulp matplotlib
To install the required packages, run:
pip install -r requirements.txt
This is a stylized optimization project. The models are not intended to provide real-world investment advice. Instead, they show how different objective functions and constraints can lead to different investment allocation patterns across countries.
The project is designed for educational and analytical purposes, with a focus on operations research, portfolio allocation, and development-oriented investment modeling.