mrsic8
 ( 19.67% )
- ago
Hello,

Is there a way to prioritize with market cap? I haven't found any.

Thanks,
0
653
Solved
5 Replies

Reply

Bookmark

Sort
- ago
#1
Hello,

1. To use market cap as TimeSeries you should install the Fundamental extension first: https://www.wealth-lab.com/extension/detail/Fundamental

2. Next, check YCharts or Morningstar on the Event Providers tab in the Data Manager, and there also check the items "shares_outstanding" or "Shares" (respectively).

3. In your strategy, build the market capitalization series as Price * Shares Outstanding.
CODE:
TimeSeries marketCap = bars.Close * Fundamental.Series(bars, "shares_outstanding", true);

4. Finally you should assign the marketCap value to your Transaction.Weight object e.g.
CODE:
t.Weight = marketCap[idx];

https://www.wealth-lab.com/Support/ApiReference/Transaction
0
Best Answer
mrsic8
 ( 19.67% )
- ago
#2
Hi Eugene,

many thanks.

1
- ago
#3
Is it meanwhile possible to do this with the Building Blocks?
0
Glitch8
 ( 12.10% )
- ago
#4
Yes

0
- ago
#5
That´s very good, thank you!
0

Reply

Bookmark

Sort