Created
May 13, 2024 22:46
-
-
Save Adobe-Android/11a3b01a287436a10489330e234ed285 to your computer and use it in GitHub Desktop.
Calculate expected dividends for a given period
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
#!/bin/env python3 | |
def main(): | |
dividend_per_share = 0.2775 | |
# Payout frequency within a year | |
# 4 for quarterly, 12 for monthly | |
# For 2 years, assuming quarterly payments, 8 would be an appropriate frequency | |
dividend_frequency = 4 | |
share_count = 1 | |
total_dividends = (dividend_per_share * share_count) * dividend_frequency | |
print(f"${total_dividends}") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment