Hello, I was wondering if there is a way to determine the return of a particular stock during the holding period?
For example, I have been holding Starbucks (SBUX) for a period of (T + delta_T), where T is the date where I purchased some amount of SBUX shares and delta_T is the holding period. The logic here is to use order_target_percent(SBUX, 0) if and only if the return on SBUX shares is more than 10%.
Are there any built-in functions (maybe pipeline?) that can do this?
Any help is greatly appreciated!