How to override frequency in Bloomberg BDS request? - excel

I am using the Bloomberg Excel add-on to retrieve bulk history data for some mutual funds. Specifically, I need to get their dividend history including dividend income, short term capital gains, long term capital gains, etc. I'll list the "dividend frequency" and "dividend type" below that I need.
For the most part, this formula works just fine:
=BDS("FILDX US Equity", "DVD_HIST_ALL", "DVD_START_DT=20080501", "DVD_END_DT=20180301", "Headers=True")
This provides me with all of the data I need for symbol "FILDX US Equity" and it respects the start and end dates.
However, for some symbols I only get about the last 12 month's worth of dividend data returned. Based on my research, if the symbol's dividend history includes a "Dividend Type" of "Daily Accrual" I only get 12 months of data. It does NOT respect my start and end date overrides.
An example would be for symbol "WAPAX US Equity". This symbol has been around for many years (and paying dividends) but BB is only returning the last year's data.
=BDS("WAPAX US Equity", "DVD_HIST_ALL", "DVD_START_DT=20080501", "DVD_END_DT=20180301", "Headers=True")
So, how do I rewrite the BDS formula so that I can get its ENTIRE dividend history? Do I need to override the "frequency" or "type" fields to filter out (or filter in) certain things? Is there a certain periodicityAdjustment or similar that I need?
Here are the frequencies and types I wish to have:
frequency => None, Monthly, Quarter, Semi-Anl, Annual, Irreg
type => Income, Short Term Cap Gain, Long Term Cap Gain, Omitted, Special Cash
Any help would be appreciated.

Related

Substract a cell (if it has a # value) with rows below it in a different column if the conditions are the same

I'm using this equation =IF(K2=0,0, K2-I2) to show the difference in a cell with what a client has to pay vs what he has paid (negative if he paid less than what he had to and positive if he paid more). How would I modify this equation to substract from the next amount paid (k3 in this case) or the following (k4) if they didn't pay in k3 so the difference becomes 0 if its used with the added condition that the name at Column C matches.
The first column is the amount someone needs to pay, the second is what they paid, the fourth shows the difference and the fifth states what it is. I would like the difference from the first row to use the paid amount from the second row to substract from it before applying itself to the difference in the second row. Is this possible? I've tried looking for hours in google with no luck.
Edit:
This is how I would like it to look (this is manually inputting the data). The amount the client has to pay each month is 425.65 so the second month he pays 400 it would first cancel the first 'debt' to then count towards his second month payment which results in more debt than the first pay cycle.
Prelim
Worksheet here / screenshot below refer.
If you don't mind using a 'helper' column (I don't see any other way around this, unless you go down the 'VBA/Pivot' route, given the nature of the sum function re arrays) - then this should (I think!:) address the issue...
Eqns
Helper
=IF(OR(B3<>B4,SUM(D$3:D3*(B$3:B3=B3))>=INDEX($C$3:$C$11,MATCH(B3,$B$3:$B$11,0))),1,0)
This turns 1 when the sum of "Paid" is at least >= "Owing" for the same individual. Assumes: rows ordered chronologically, grouped by 'Person' attribute.
Net ultimate
=IF(B3=B2,"",SUM(D3:INDEX($D$3:$D$11,MATCH(B3&1,$B$3:$B$11&$E$3:$E$11,0))))
Screenshots
This sums from the first instance of 'Paid' for a given Person, to the Paid value corresponding to the first instance of a '1' in the Helper column.
Examples
In this case, A owes £1k at outset, pays £450 initially, then pays a further £700 (i.e. has overpaid by £150). As such, the 'Net ultimate' figure reports back £1,150 (=£450 + £700); it doesn't consider the £50 (did you want it to? If so the function becomes a lot easier, and reduces to a regular sumifs...).
For B: net ultimate = £1,025 (the total amounts paid never exceed what is owing, so tally all amounts paid by B)
Same goes for £1k and C....

Why does ICU have distinctions for "stand alone" values for dates?

ICU has different formatting symbols for "stand alone" values. For example:
q Stand Alone quarter
L Stand Alone month in year
c Stand Alone local day of week
The documentation states:
"Stand Alone" values refer to those designed to stand on their own, as opposed to being with other formatted values. "2nd quarter" would use the stand alone format (QQQQ), whereas "2nd quarter 2007" would use the regular format (qqqq yyyy).
However, this doesn't explain why there is a distinction. I presume that this matters for some languages, but what are some examples?
(More confusingly, the documentation contradicts itself since it uses both q and Q for the stand alone version.)
I also presume that stand alone versions aren't needed for other fields (such as year, hour, minute, seconds) because those are numeric. If that's the case, however, why do the stand alone values for weekday, month, and quarter support numeric forms?
Distinction is relevant for ie Polish in which expressing day dd MMMM yyyy: "22 września 2022" is different than expressing just a month like ie in calendar LLLL yyyy: "wrzesień 2022".
I ended up filing ICU-21225 to correct the contradiction in the documentation and to ask for clarification. One of the comments directed me to https://www.unicode.org/reports/tr35/tr35-dates.html#months_days_quarters_eras, which states:
The context is either format (the default), the form used within a complete date format string (such as "Saturday, November 12"), or stand-alone, the form for date elements used independently, such as in calendar headers. The most important distinction between format and stand-alone forms is a grammatical distinction, for languages that require it. For example, many languages require that a month name without an associated day number (i.e. an independent form) be in the basic nominative form, while a month name with an associated day number (as in a complete date format) should be in a different grammatical form: genitive, partitive, etc.
I'm still curious about specific examples (which languages?), though.

Excel: Formula to help calculate profits

I am stuck and have been watching videos and googling a lot today.
My problem is that i need to calculate the tax to deduct as well as deduct the wholesale cost of the product on an excel spread sheet.
There are 3 regions east, west and central all with different tax amounts.
East is an $0.15 tax with a $50$ price deduction
Central is an $0.18 tax with a $40 price deduction
West is an $0.18 tax with a $30 price deduction
Revenue before tax - E2
Region - B2
enter image description here
I have tried =IF(B2="east",G2*0.15, '')IF(b2="central",G2*0.18,'')
I am unsure what to put in the if false slot or if I'm even on the right track.
Thanks for your time!
When facing a problem like yours it's good to remember the basic rule of Excel, "Never put data into a formula". Data belong in a worksheet. Formulas merely manipulate them. Accordingly, you need a table like this one.
Now the solution is easy - or it would be if your description was unambiguous. I presumed that what you call "price reduction" is in fact a tax free portion of the sale. So, if the value of the sale is $200 tax will be paid on an amount smaller than this. Of course, this leads to the possibility of a negative tax which is unlikely to be on offer. Therefore the formula to be employed is [Tax base] = [Sale Amount] - [Tax excempted amount], but not less than zero.
Based on the above presumption the formula below will do the job if you named the table pictured above as "Taxes". If you didn't name it, the default name might be Table1 and you can change that name in the formula.
=G2+MAX(ROUND((G2-VLOOKUP(B2,Taxes,3,FALSE))*VLOOKUP(B2,Taxes,2,FALSE),2),0)
I point out that the formula also rounds the result. This is important in a sheet like yours because you can't afford the total in column H to be different from what you see, and all you see is 2 digits.
Whenever the taxes change you simply change the table and leave the formulas in place. That part is easy. But there is one thing to remember. All the formulas of the past also refer to the table and all your old sales amounts will get "updated". So, when rates change, first Copy/PasteSpecial>Values all existing, or create a new table called Taxes2020 and start using a new formula referring to that table from the cut-off date forward.
If the price deduction if from the total for the region you should calculate it in two stages, the sum for the region, and then the net after tax.
If the deduction is per transaction I would suggest adding a lookup table and add another column to your list which will allow you to calculate all regions with the same formula.
=IF(B2="East",(G2*1.15)-50, IF(b2="Central",(G2*1.18)-40,(G2*1.18)-30))

Parsing percent values from string in Excel

I am currently working on a financial model where each team receives different types of news such as this :
1,379,BondD,News regarding Dayaria Milk Products,Dayaria Milk
Products' sales increase by 25% in comparison to an analyst consensus
of 23%. The market is currently questionning whether it is due to an
increase in sales of organic milk given the health trends, or due to
the temporary increase in prices after the shortage in North America.
P.S. I didn't make the names.
Since this is a sales increase and it contains a percent sign increase, but only one of the % values actually matters.
I already have a parsing function that pulls for words such as 'increase' and 'decrease' but I haven't been able to figure out how I should go about differentiating % values that are useful and ignoring the ones that not.
Thanks ahead of time.
if the increase or decrease percentage always follows those words then use the instr function to first find the word and then again to find the following % sign.
longNumber1 = instr(1,textVariable,"increase")
longNumber2 = instr(1,longNumber1, textVariable, "%") - 3
stringVariable = mid(textVariable,longNumber2, 3)

Complicated formula required to work out costs including multiple discounts

I'm looking to compute and show individual row totals and a Grand Total. I just need the formulae to put in the boxes so the calculation is automatic but the problem is the calculations are a little complicated...
I'm using data validation to select the day type. This is what I think I need:
Assign a price to the day type (either Standard day = £23 or Extended day = £26).
Apply a volume discount where appropriate. If Jack is attending all week (5 days) and the day type is the same for all (all Standard or all Extended), the total cost is £100 (or £120)
Else the total number of days needs to be added up for Jack. (Number of days for each ‘day type’) and priced up.
For his siblings after the first, as above but apply an additional discount of 15%.
The grand total then needs to show at the bottom.
Well, it is not the best of data layouts but this may serve, in L6 and copied down to L13:
=IF(OR(A6="Brother",A6="Sister"),0.85* IF(COUNTIF(B6:F6,"Standard day")=5,100,IF(COUNTIF(B6:F6,"Extended day")=5,120,COUNTIF(B6:F6,"Standard day")*23+COUNTIF(B6:F6,"Extended day")*26)), IF(COUNTIF(B6:F6,"Standard day")=5,100,IF(COUNTIF(B6:F6,"Extended day")=5,120,COUNTIF(B6:F6,"Standard day")*23+COUNTIF(B6:F6,"Extended day")*26)))
and =SUM(L1:L16) in D16.
It would be better practice not to hard code the daily rates/discount, but extracting these from C1:D2 would have increased the length of the formula further.
Note also the result is not £429.95 (you may have changed your example after doing your calculations).

Resources