Hello,
I would like to reference a particular cell in my database to generate a local macro (I think “local macro” is the right terminology, but I’m not sure). All of this is done within a few loops, but I’ve ignored that part of the code because I suspect the loops make no difference for this question.
I would like to do this:
Look up the value of “shares_owned” and "control_owned" for observations which have specific values of “mngr_no” and “cusip”. Then, I would like to use this value in a calculation.
Closer to pseudo-code:
Local a_k = [mngr_no 1’s control_owned of cusip 11111] * [mngr_no 1’s shares_owned of cusip 222222]
Data looks like this:
Thank you!
Nathan
I would like to reference a particular cell in my database to generate a local macro (I think “local macro” is the right terminology, but I’m not sure). All of this is done within a few loops, but I’ve ignored that part of the code because I suspect the loops make no difference for this question.
I would like to do this:
Look up the value of “shares_owned” and "control_owned" for observations which have specific values of “mngr_no” and “cusip”. Then, I would like to use this value in a calculation.
Closer to pseudo-code:
Local a_k = [mngr_no 1’s control_owned of cusip 11111] * [mngr_no 1’s shares_owned of cusip 222222]
Data looks like this:
mngr_no | cusip | shares_owned | control_owned |
1 | 111111 | 100 | 100 |
2 | 111111 | 50 | 25 |
1 | 222222 | 200 | 100 |
2 | 222222 | 500 | 10 |
Nathan
Comment