Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linear Optimization: Equality Constraint over all observations

    Hello everyone,

    I am a beginner when it comes to linear optimazation (using Mata). Currently, I'm trying to implement an equality constraint that makes sure that banks (n) can only increase their interbank funding (IBF) if another bank is willing to increase its interbank loans (IBL), and vice versa.

    As far as I understood it so far, for a single observation the equality restriction would look like this (simplified example of my model):

    Code:
    * Objective funtion
    q.setMaxOrMin("max")
    c = (r_IBL, -r_IBF)     // r_ = Interest Rate
    
    *  Δ Interbank loans =  Δ Intrabank funding
    eq1_lhs = (J(n, 1, 1), J(n, 1, -1)) ; eq1_rhs = (J(n, 1, 0))
    This would mean, however, that each bank provides exactly as much interbank lending as it receives interbank funding. This is not what im trying to model. Instead, some banks may have surplus in received interbank funding, while others have a surplus in loans. It's just important that the changes (Δ) are equal in total.

    Is this possible to do? Thank you very much for your help in advance.

    Best wishes,
    Sebastian
Working...
X