Kamis, 25 September 2014

[MS_AccessPros] Query and Grouping Question

 

Hi, would any of you please help me to set up this query and grouping issue?


Say, I have a list of stocks and their position weights in table t_Holding (Col 1: Ticker, Col B: Weight (ABC 20%, CDF 15%, GHI 25% MNO 10%, and XYZ 30% to make a total of 100%)


In table t_Exposure I have Col 1: Ticker, Col 2: InterestRateSensitive, Col 3: OilPriceSensitivve, Col 4: EcoCyclical, Col 5: GovernmentSpending). This table consists of the same tickers in t_Holding table but the tickers have yes/no checks on some of the columns. 


Stock ABC have checks (yes/no) on Col 1 and Col 4

Stock CDF has checks on Col 2, col 3,

Stock CDF have checks on col 5

Stock GHI have check on col 2 and col 3

Stock  MNO have checks on Col 2 and col 5,

Stock XYZ have checks on col 4.


How can I group these so that I can see how my portfolio is exposed to different factors.

Of the example above, I would like to see the result grouped by:


InterestRateSensitive group includes stock ABC and a sum of exposure of 20%.

OilPriceSensitive group include stocks CDF, GHI, and MNO and a sum of exposure of 50% (15%+25%+10%)

EcoCyclical group include stocks CDF, GHI and a sum of exposure of 40% (15%+25%)

GovernmentSpending include stocks CDF and MNO and a sum of exposure of 25% (15%10%)



I don't know how to do a query that one stock can be in many "buckets"  (many-to-many query?).


Thanks so much in advance for your instruction!


Tim




__._,_.___

Posted by: timdbui@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar