SHARE
TWEET

Untitled

a guest Jun 16th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. In[1]
  2. df = {'Loan Nego': [2019-03-01, 2019-03-01], 'New Maturity': [2019-03-11, 2019-03-29],'Loan Amount in OCUR': [1000, 2000]}
  3.  
  4. Out[1]
  5. Loan Nego          New Maturity          Loan Amount in OCUR  
  6. 2019-03-01         2019-03-11            1000
  7. 2019-03-01         2019-03-29            2000
  8.  
  9. In[2]
  10. df.dtypes
  11.  
  12. Out[2]
  13.  
  14. New Maturity               datetime64[ns]
  15. Loan Nego                  datetime64[ns]
  16. Loan Amount in OCUR        float64
  17.      
  18. # Equation CLOF
  19. def clof(loan,maturity, amount):
  20. days = (maturity-loan).days
  21. return ((amount * days)/ 360) * (2.36/100)
  22.      
  23. df["New Interest"] = clof(df["Loan Nego"],df["New Maturity"],df["Loan Amount in OCUR"])
  24.      
  25. Loan Nego          New Maturity          Loan Amount in OCUR       New Interest
  26. 2019-03-01         2019-03-11            1000                        0.65            
  27. 2019-03-01         2019-03-29            2000                        3.671
  28.      
  29. days = (maturity-loan).dt.days
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top