Extract a value at a specified time from a stock
Posted: Tue Feb 26, 2019 7:34 pm
Hi,
Is it possible to extract a value at a specified time from a stock? For example, my stock has the following values:
Year 2000, stock = 0
Year 2001, stock = 1
Year 2002, stock = 2
Year 2003, stock = 3
...
Year 2029, stock = 29
Year 2030, stock = 30
Is there a straightforward way to extract a value, say the value for year 2015, and assign it to another variable in the same model? I know this can be done "manually", but want to see if it can be done "automatically". I tried "SAMPLE IF TRUE" however the result returned is a constant line for all years after 2015, rather than just 1 single value point for year 2015.
Many thanks.
Is it possible to extract a value at a specified time from a stock? For example, my stock has the following values:
Year 2000, stock = 0
Year 2001, stock = 1
Year 2002, stock = 2
Year 2003, stock = 3
...
Year 2029, stock = 29
Year 2030, stock = 30
Is there a straightforward way to extract a value, say the value for year 2015, and assign it to another variable in the same model? I know this can be done "manually", but want to see if it can be done "automatically". I tried "SAMPLE IF TRUE" however the result returned is a constant line for all years after 2015, rather than just 1 single value point for year 2015.
Many thanks.