Created
July 8, 2022 01:46
-
-
Save dkatz23238/62f1b0dafc2d6ebaa4f61c1b285d4795 to your computer and use it in GitHub Desktop.
Formulas for agro economics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dc direct costs - usd/ha | |
# ps price soy - usd/tn | |
# qr cost of land in quintals of soy - qq/ha | |
# ya yield of the activity - qq/ha | |
# pa price of the activity if activity not soy - usd/tn | |
# td direction costs - percent | |
# fs fixed sharecropping - percent | |
# import numpy as np | |
# import matplotlib.pyplot as plt | |
ha = 1000 | |
dc = 70 | |
ps = 100 | |
qr = 10 | |
td = 0.025 | |
fs = 0.3 | |
ya = 100 | |
pa = 160 | |
paq = pa / 10 | |
yields = [] | |
profits = [] | |
ya_prime = ((dc + (qr * ps)) / paq) / (1 - td - fs) | |
paq_prime = (dc + (qr * ps)) / ((1 - td - fs) * ya) | |
dc_prime = ya * paq - qr * ps - (ya * paq) * (td + fs) | |
total_costs_ha = dc + (qr * ps) + (ya * paq * (fs + td)) | |
income_ha = ya * paq | |
profit = income_ha - total_costs_ha | |
d = { | |
"income_ha": income_ha, | |
"costs": total_costs_ha, | |
"profit": profit, | |
"ya_prime": ya_prime, | |
"dc_prime": dc_prime, | |
"paq_prime": paq_prime, | |
"price_yield_tolerance": (ya - ya_prime) / ya, | |
"direct_cost_capacity": (dc_prime / dc) - 1, | |
} | |
for k, v in d.items(): | |
print(f"{k}: {round(v,2)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment