Find Jobs
Hire Freelancers

Compound Return SQL UDA or Table Value Function

$15-20 USD

Closed
Posted over 15 years ago

$15-20 USD

Paid on delivery
Development of a SQL Server 2008 UDA (User Defined Aggregate) or Table Value Function to perform chronological Compound Rate of Return Results from Monthly Percent Based Gains. ? The UDA should be eligible for use among other common aggregates (i.e. COUNT, AVG, MAX, MIN, SUM), however, this UDA requires Chronological Calculation (in order of earliest date to latest date). ? It may be necessary to specify, as an input to the function, which datefield to use for chronology. ? A function is needed so results can by handled through SQL Query combined with other results not handled specifically by the function. ## Deliverables Example Table of Monthly Results January - 15% February - 0% March - 12% April - (-8%) May - 0% June - (-2%) July - 18% WHERE Initial Amount could be set to 1, while Result returned will be Percentage. 1 * 15% + 1 = 1.15 1.15 * 0% + 1.15 = 1.15 1.15 * 12% + 1.15 = 1.288 1.288 * -8% + 1.288 = 1.18496 1.18496 * 0% + 1.18496 = 1.18496 1.18496 * -2% + 1.18496 = 1.1612608 1.1612608 * 18% + 1.1612608 = 1.370287744 For this Period, the final result is 1.370287744 which is a Compound Return for the period of 37.02% (Value to Return) The function must consider all dates passed through the original query. i.e. SELECT FieldA, UDA(MRET, PDate) -- Where MRET is the Monthly Return and PDate is the Date Sort Field FROM TABLE WHERE PDate Between '01/01/2002' AND '07/31/2002' OR SELECT FieldA, Year, UDA(MRET, PDate) FROm TABLE WHERE PDate BETWEEN '01/01/2002' AND '12/31/2008' In the 2nd case, each Year would have it's own Compound Return.
Project ID: 3517749

About the project

1 proposal
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $17 USD for this job
User Avatar
See private message.
$17 USD in 3 days
3.7 (28 reviews)
5.4
5.4

About the client

Flag of UNITED STATES
United States
5.0
1
Member since Nov 23, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.