allfed / pytradeshifts

Contains code and documentation for the pytradeshifts model
Apache License 2.0
0 stars 2 forks source link

Implementation of trade reduction (or amplification) due to distance #17

Closed lukaszgajewski closed 9 months ago

lukaszgajewski commented 9 months ago

I've implemented the modification to the trade matrix based on the gravity model of trade. The PyTradeShifts now has an additional parameter 'beta' that controls the strength of the modification. The idea is that we multiple the trade matrix by the distance between regions raised to the power of negative beta -- higher the beta, the less trade. For beta == 0 we get no change, for beta < 0 we amplify the trade.

florianjehn commented 9 months ago

Looks good, some minor change suggestions:

lukaszgajewski commented 9 months ago

I've implemented the suggestions.