Best practice to implement future projection

  • Hello:

    I have scenario where I have to implment future projection of person's benefit given the date specified by user. What is the best apporach to go about it? Do the projection in the code or in function in sql server? It is similar to say you given a stock price of a company, predict what will be the price after 25 years given some variables(for instance, % rate of increase every year) and list the price of every year until 25 years as a output?

    Thanks in advance.

     

  • It depends...

    How many stocks do you need to do this for and how often?  Very well may be better to do it in a GUI but... it depends.  SQL server is very fast about these types of calcs if you have the necessary "helper" tables such as one that may have the necessary dates preconstructed.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Here is the more detail. I have to compute this year's benefit for a person given his compensation and start date of computation and DOB. Assume Fixed % of increase in compensation every year, calculate benefit for the next year and every year thereafter till person's is certain age.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply