Closed nashquant closed 1 year ago
Hi - This is good but can you rename class SwapEquityLeg class to EquitySwapLeg. I will study it more later.
Hi @domokane
Thank you! Will update this soon.
prettytable
is not included in package dependency 😕
It is already in requirements.txt. Where else should it be ?
@domokane , it should be here https://github.com/domokane/FinancePy/blob/762dfb31eaa335b144cc7345a89bb4fd0b1c0d24/setup.py#L48 not requirements.txt
, a little tricky.
Apologies for missing that, and thank you both for reviewing this. I'm currently in a trip with limit access to pc.
@domokane wow Ser! This is an AMAZING project. You basically gave the 'world'/everyone FREE, what costs (tens of, to hundreds of) millions of dollars in Quant salaries and Quant code, what Investment Banks took decades to build!
I salute you, Ser.
side note on this issue, @nashquant , yes, the issue is still there. I just have to manually install in (Ana)conda : $pip install prettytable to correct the error
Thanks. I updated setup.py but I need to roll a new version. I will do that asap.
Hi @domokane,
Here's a first version of the implementation for Equity Swaps as mentioned in issue #159. Looking forward for a feedback of yours!
Some details: 1) Implemented Equity Swap for Total return only - Thought that Price Return would be complicated for this first round, as it requires the generation of the div payments separately.
2) Enabled only Float Rate for Rate Leg for now - also to avoid extra complexity in this first round.
3) Given that Equity Leg has variable notional - i.e. at every reset we need to update the new notional to reflect the new price of equity - I had to make some small changes to the SwapFloatLeg model to address this issue - Let me know if you disagree or think of a better way to address this.
4) Implemented three tests that should cover basic logic for this model - let me know if you think of something else that must be there in this first round.
5) I wasn't being able to generate good-looking tables for the payments schedule and valuation prints, so I used an external lib PrettyTable. Let me know if you're against it, I can give it another try, but I'm letting attached a print of how it's looking now - and I sort of liked it.
6) Overall, I tried to stick to the conventions and code style of EquitySwapFloat, but of course I might have overlooked some aspects, so feel free to point me to them.
Best, Matheus