and what is the sql you tried so far?
All functions you mention from excel can accurately be done in SQL with a possible exception of yearfrac - as The YEARFRAC function may return an incorrect result when using the US (NASD) 30/360 basis, and the start_date is the last day in February. - and this is the basis you are using on your example.
And do supply DDL to create table, sample data (through insert statements) and desired output on a consumable format