Weighted mean, sd and median - Size Weighted (Negative Numbers) - excel

I need to calculate the weighted median, average, sd of PE funds' returns. I weighted the sample according to the amount of committed capital of a fund, but I should consider negative products to analyze underperforming funds. However, I'm not sure if I can use neg/zero values to derivate these statistic measures.
Wμ = Σ(w,x)/Σw --> the formula i consider for wgt. average
w = Fund's size
x = net IRR
(w,x) = Neg & Pos values.
How can I calculate those measures, including negative/zero values? I'm doing it in Excel
My standpoint is the Kaplan and Schoar's approach (Private Equity Performance: Returns, Persistence, and Capital Flows)
Any help on this matter is really appreciated!

Related

Rank order data

I have the loan dataset below -
Sector
Total Units
Bad units
Bad Rate
Retail Trade
16
5
31%
Construction
500
1100
20%
Healthcare
165
55
33%
Mining
3
2
67%
Utilities
56
19
34%
Other
300
44
15%
How can I create a ranking function to sort this data based on the bad_rate while also accounting for the number of units ?
e.g This is the result when I sort in descending order based on bad_rate
Sector
Total Units
Bad units
Bad Rate
Mining
3
2
67%
Utilities
56
19
34%
Healthcare
165
55
33%
Retail Trade
16
5
31%
Construction
500
1100
20%
Other
300
44
15%
Here, Mining shows up first but I don't really care about this sector as it only has a total of 3 units. I would like construction, other and healthcare to show up on the top as they have more # of total as well as bad units
STEP 1) is easy...
Use SORT("Range","ByColNumber","Order")
Just put it in the top left cell of where you want your sorted data.
=SORT(B3:E8,4,-1):
STEP 2)
Here's the tricky part... you need to decide how to weight the outage.
Here, I found multiplying the Rate% by the Total Unit Rank:
I think this approach gives pretty good results... you just need to play with the formula!
Please let me know what formula you eventually use!
You would need to define sorting criteria, since you don't have a priority based on column, but a combination instead. I would suggest defining a function that weights both columns: Total Units and Bad Rate. Using a weight function would be a good idea, but first, we would need to normalize both columns. For example put the data in a range 0-100, so we can weight each column having similar values. Once you have the data normalized then you can use criteria like this:
w_1 * x + w_2 * y
This is the main idea. Now to put this logic in Excel. We create an additional temporary variable with the previous calculation and name it crit. We Define a user LAMBDA function SORT_BY for calculating crit as follows:
LAMBDA(a,b, wu*a + wbr*b)
and we use MAP to calculate it with the normalized data. For convenience we define another user LAMBDA function to normalize the data: NORM as follows:
LAMBDA(x, 100*(x-MIN(x))/(MAX(x) - MIN(x)))
Note: The above formula ensures a 0-100 range, but because we are going to use weights maybe it is better to use a 1-100 range, so the weight takes effect for the minimum value too. In such case it can be defined as follow:
LAMBDA(x, ( 100*(x-MIN(x)) + (MAX(x)-x) )/(MAX(x)-MIN(x)))
Here is the formula normalizing for 0-100 range:
=LET(wu, 0.6, wbr, 0.8, u, B2:B7, br, D2:D7, SORT_BY, LAMBDA(a,b, wu*a + wbr*b),
NORM, LAMBDA(x, 100*(x-MIN(x))/(MAX(x) - MIN(x))),
crit, MAP(NORM(u), NORM(br), LAMBDA(a,b, SORT_BY(a,b))),
DROP(SORT(HSTACK(A2:D7, crit),5,-1),,-1))
You can customize how to weight each column (via wu for Total Units and wbr for Bad Rates columns). Finally, we present the result removing the sorting criteria (crit) via the DROP function. If you want to show it, then remove this step.
If you put the formula in F2 this would be the output:

Finding parameters values of growth function?

Number of days before vaccination (x) bacteria count (1000 pieces) (y)
1 112
2 148
3 241
4 363
5 585
I Need to find 2 things
first calculate with growth function third day count and I have been counted.
=GROWTH(I3:I4;H3:H4;H5)
But I need to calculate parameters of growth function( 𝑌=𝑎.𝑏^𝑋)
So how to calculate a and b? I tried to use excel solver but i didn't solve
Seems like LOGEST is designed for what you want:
the LOGEST function calculates an exponential curve that fits your
data and returns an array of values that describes the curve. Because
this function returns an array of values, it must be entered as an
array formula.
Note that there is a difference in how the equation is expressed on an x-y chart with an exponential trendline, and by the function. On the chart, m is expressed as a power of e, so to convert the value returned by the formula to be the same as what is seen on the chart, you would do something like:
=LN(INDEX(LOGEST(known_y,known_x),1))
You are dealing with an exponentional growth, you want to describe. The basic way to handle this, is to take the logarythm of the whole thing, and apply linear regression on that, using the Linest() function.

Computing sum of progressively-increasing values in Excel

I am trying to solve an iterative problem in Excel. I want to be able to calculate the sum of rent for x years. The rent is increasing at a rate of 10 percent every year. I quickly came up with this python code on a REPL for clarity:
year = 6
rent = 192000
total_rent = rent
for x in range(1 , year):
rent= rent + .1*rent
total_rent = total_rent + rent
print(total_rent) # 1481397.12 is what it prints
This is a trivial problem in programming but I am not sure the best way to achieve this in excel.
In excel I am doing it this something like this:
But all the intermediate rent amount(s) are not really needed. I guess there should be a for loop here as well too, but is there a mathematical representation of this problem which I can use to create the expected result?
If you have a financial problem, you might try the financial functions of excel.
=-FV(0.1, 6, 192000)
or
=FV(0.1, 6, -192000)
the detail: FV on Office Support
Description
FV, one of the financial functions, calculates the future value of an investment based on a constant interest rate. You can use FV with either periodic, constant payments, or a single lump sum payment.
Syntax
FV(rate, nper, pmt, [pv], [type])
For a more complete description of the arguments in FV and for more information on annuity functions, see PV.
The FV function syntax has the following arguments:
Rate Required
The interest rate per period.
Nper Required
The total number of payment periods in an annuity.
Pmt Required
The payment made each period; it cannot change over the life of the annuity. Typically, pmt contains principal and interest but no other fees or taxes. If pmt is omitted, you must include the pv argument.
Pv Optional
The present value, or the lump-sum amount that a series of future payments is worth right now. If pv is omitted, it is assumed to be 0 (zero), and you must include the pmt argument.
Type Optional
The number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.
Your problem is a geometric series where the initial term is a = 192000 and the common ratio is r = 1.1. (The ratio is not just the 10% added, it includes the 100% that is added to.) To refresh your Algebra II memory, a geometric series is
total = a + a*r + a*r**2 + ... + a*r**(n-1)
The closed-form formula for the sum of the geometric series is
total = a * (r**n - 1) / (r - 1)
(using Python syntax), or, using something closer to Excel syntax,
total = a * (r^n - 1) / (r - 1)
where n is the number of years. Just substitute your values for a, r, and n.
As the question is about excel it is possible by
Or by using the FV function.
FV returns the future value of an investment based on regular payments and a constant interest rate.
Attributes of the FV function;:
Rate: The interest rate per period.
Nper: The total number of payment periods in an annuity.
Pmt: The payment made each period; it cannot change over the life of the annuity. Typically, pmt contains principal and interest but no other fees or taxes. If pmt is omitted, you must include the pv argument.
Pv: The present value, or the lump-sum amount that a series of future payments is worth right now. If pv is omitted, it is assumed to be 0 (zero), and you must include the pmt argument.
Type: The number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.
Yet another way is computing it as a geometric series with the non-financial function SERIESSUM:
=SERIESSUM(1.1,0,1,192000*{1,1,1,1,1,1})
The rate multiplier is 1.1, starting from 1.1^0 == 1 and increasing by 1 each year. The result is 1*a + 1.1*b + 1.1^2*c.... The array 192000*{1,1,...} provides the coefficients a, b, c, ... : one array value for the initial total_rent = rent, and one for each subsequent year 1..5 (from range(1,year)).

understanding of result of logistic regression

let us suppose we have following data with binary response output(coupon)
annual spending is given in 1000th unit, my goal is to estimate whether if customer spend more then 2000 and has Simmons card, will also have coupon, first of all i have sorted data according to response data, i got following picture
at next stage i have calculated logit for each data, for those initially i choose following coefficient
B0 0.1
B1 0.1
B2 0.1
and i have calculated L according to the following formula
at next stage i have calculated e^L (which in excel can be done easily by exp function )
=EXP(D2)
after that i have calculated probability
=E2/(1+E2)
and finally using formula
i have calculated log likelihood function
then i have calculated sum and using solver i have calculated coefficient that minimize this sum( please pay attention that values are given in negative value) , but i have got all coefficient zero
i am wrong ? or does it means that i can'predict buying of coupon on the base of Annual spending and owning of Simmons card? thanks in advance
You can predict the buying of a coupon on the base of Annual spending (and knowing Simmons card doesn't help).
Admittedly I didn't solve it in Excel, but I suspect the problem might be that your optimization didn't converge (i.e., failed to reach the correct coefficients through the solving process) -- the correct coefficients are B0 = 5.63, B1 = -2.95, and B2 = 0. I found an online reference for the Excel logistic regression procedure at http://blog.excelmasterseries.com/2014/06/logistic-regression-performed-in-excel.html.
I ran the logistic regression myself and found that Annual spending is significant (at the 0.05 level) whereas Simmons card is not. Re-running the model with Simmons card removed yields the following equations:
L = 5.63 - 2.95 * Annual spending
P(1) = exp(L)/(1 + exp(L))
If P(1) > 0.5 => coupon = 1
Although the entropy Rsquare is low at 0.39 (and the number of data points is very low), the model is statistically significant.

Excel Formula: Solve for X where Y * Z% = X, Y and Z are known

That was probably a terrible title.
I have required after tax revenue and the expected effective tax rate, I need to know how to calculate the gross revenue required to meet the after tax revenue when the tax rate is factored.
Example
I need 100K in revenue to pay all company expenses.
The tax rate of the company is going to be 20%.
How do I figure out how much revenue I must have, in order to have 100K after 20% is taken out.
Or more specifically, how do I express that in an Excel formula.
Sounds like a gross margin calculation. Here's a utility I give to my staff, for you the 3rd section should be relevant. Hope this helps
I think the problem is with your maths, though your Title is incorrect (despite giving a reasonable indication of your requirement!)
Using X as your unknown, Y as % (expressed as a decimal, so 20% is 0.2) and Z as the outcome (100) you could use Solver, as shown:
But this is overkill for what is solvable with a formula. The relationship can be expressed as:
X – X * Y = Z
and that can be rearranged as below:
X(1-Y)=Z
X=Z/(1-Y)
With the values in your example:
X=100/(1-0.2)
X=100/0.8
So with Y and Z in the cells as shown in blue, X may be derived with =C4/(1-B4) (shown in A4).

Resources