Journal of Mathematical Finance
Vol.06 No.04(2016), Article ID:71251,18 pages
10.4236/jmf.2016.64044
Foundations for Wash Sales
Phillip G. Bradford
Department of Computer Science and Engineering, University of Connecticut, Stamford, CT, USA

Copyright © 2016 by author and Scientific Research Publishing Inc.
This work is licensed under the Creative Commons Attribution International License (CC BY 4.0).
http://creativecommons.org/licenses/by/4.0/



Received: June 13, 2016; Accepted: October 14, 2016; Published: October 17, 2016
ABSTRACT
Consider an ephemeral sale-and-repurchase of a security resulting in the same position before the sale and after the repurchase. A sale-and-repurchase is a wash sale if these transactions result in a loss within ±30 calendar days. Since a portfolio is essentially the same after a wash sale, any tax advantage from such a loss is not allowed. That is, after a wash sale a portfolio is unchanged so any loss captured by the wash sale is deemed to be solely for tax advantage and not investment purposes. This paper starts by exploring variations of the birthday problem to model wash sales. The birthday problem is: Determine the number of independent and identically distributed random variables required so there is a probability of at least 1/2 that two or more of these random variables share the same outcome. This paper gives necessary conditions for wash sales based on variations on the birthday problem. Suitable variations of the birthday problem are new to this paper. This allows us to answer questions such as: What is the likelihood of a wash sale in an unmanaged portfolio where purchases and sales are independent, uniform, and random? Portfolios containing options may lead to wash sales resembling these characteristics. This paper ends by exploring the Littlewood-Offord problem as it relates capital gains and losses with wash sales.
Keywords:
Wash Sales, Tax, Birthday Problem, Littlewood-Offord, Probability, Finance

1. Introduction
Wash sales occur when a security is sold and quickly bought back with the sole intent to capture a tax loss from the sale. Wash sales impact a portfolio’s tax liabilities. Deter- mining the likelihood of wash sales is also important for understanding investment strategies and for comparing actively and passively managed portfolios. Wash sales apply to investors, but not to market makers.
Taxes play a significant role in economics and finance. Taxes influence behavior, shape the engineering of financial transactions, and sometimes have unintended consequences. Therefore, thoughtful analysis is imperative for taxes. This paper adds firm mathematical foundations to aid the understanding of wash sale taxes.
The main goal of this paper is: To provide foundations for certain wash sales-in cases when they may occur as well as the capital gain implications. This may also help differentiate managed funds and unmanaged index funds in terms of wash sales.
Wash sales are sometimes created by the exercise of options, thus a portfolio manager may not be able to avoid a wash sale in some contexts. For example, suppose an in-the-money American-style put option is written in a portfolio. Provided this option remains in-the-money, it may be exercised by its holder1 at anytime up to its expiry. If the exercise of this put option replaces shares sold at a loss in the prior 30 days, then this is a wash sale. This option’s exercise is beyond control of the portfolio manager.
The foundations given here start with variations of the classical birthday problem from probability theory [1] - [3] . This work has implications on wash sales. Also, the Littlewood-Offord problem [4] - [6] is applied to understand capital gains for certain wash sales. The Littlewood-Offord problem is viewed from the perspective of the pro- babilistic method.
For convenience, let
.
1.1. Wash Sales in Detail
Suppose a security is sold at a loss on day
. This sale is a wash sale if substantially the same security is purchased within
calendar days from
, see for example [7] .
Definition 1 (US wash sale [7] ) Consider three dates
and
where
calendar days. Suppose s shares of a security are purchased on date
at price
. At some later date
, s shares are sold for price
. Thus, the s shares are sold at a loss. Then within
days on date
, s shares are repurchased for price
. This is a wash sale and since
days, then the next adjustments must be made [7] :
1) The loss
is not permissible for taxes. That is, this loss may not be subtracted from profits or gains and it may not be used to get a lower tax rate.
2) The cost-basis of the shares repurchased on
is set to
. The shares purchased on 

Short positions may also be wash sales. For example, consider holding a short position of 100 shares of a security starting on date 






Consider a wash sale as described by Definition 1, where 










This means such a wash sale gives 





Wash sales may be avoided by restricting each security in a portfolio to be either purchased or sold only every 31 calendar days. This restriction may not be suitable for many portfolios. In a portfolio containing options, it may be impossible to maintain this restriction.
It has also been suggested, e.g. [9] , wash sales may be avoided by purchasing or selling (moderately) correlated, but not substantially the same, securities. That is, if a security is sold at a loss then purchase a different but correlated security within 30 days maintaining some of a portfolio’s characteristics while keeping the tax advantage.
Historically many securities are assumed to only trade on about 

1.2. Background
There has not been much research on wash sales, e.g., [9] . There is important work on taxation and its investment implications. Take, for example, [11] - [13] .
The birthday problem is classical.
Definition 2 (Birthday-Collision) Given two random variables 



To model random wash sales, this paper assumes independent identically distributed random variables. A common statement of the birthday problem is:
Definition 3 (Birthday Problem) Consider n days in a year and k independent identically distributed (iid) uniform random variables whose range is 


According to a blog post by Pat B [14] the birthday problem may have originally been given by Harold Davenport as cited in [15] and later published by [1] . In any case, von Mises gave the first published version to the best of our knowledge.
Bounds of day counts for the birthday problems include [16] who gives bounds for birthdays of distance d for both linear years as well as cyclic years. In a cyclic year, 1-January is a single day from 31-December of the same year. Bounds for birthdays of distance d for cyclic years are given by [17] .
The birthday problem applied to boys and girls (random variables with different labels) are discussed in [18] as well as [19] . That is, how many birthdays are shared by one or more boys and one or more girls? A comprehensive view is provided by [20] including stopping problems with the boy-girl birthday problem. Non-uniform bounds for online boy-girl birthday problems are given by [21] and [22] .
Tight bounded Poisson approximations for birthday problems are given by [23] . Poisson approximations to the binomial distribution for the boy-girl birthday problem is given by [19] . A Stein-Chen Poisson approximation is used by [24] to solve variations of the standard birthday problem. Matching and birthday problems are given by [25] . Incidence variables are used to study birthday problems with Pareto-type distributions in [26] .
Applications of the birthday problem include: computer security [20] [21] [26] [27] , public health and epidemiology [28] , psychology, DNA sequence alignment, experi- ments, and games [29] [30] . Summaries of work on the birthday problem are in [29] - [31] .
Results on the expectation for getting j different letter k-collisions are given by [32] . Their results are expressed as truncated exponentials or gamma functions.
The Littlewood-Offord problem hails from complex analysis [6] . Erdös [5] improved Littlewood and Offord’s result by an elegant application of the probabilistic method. These and related results determine the concentration of sums of random variables multiplied by integers. The Littlewood-Offord problem is applied to certain capital gains.
1.3. Structure of This Paper
Section 2 reviews variants the birthday problem applied here. First the classical birthday problem is discussed. Next this section progresses through the 


Subsection 2.1 gives an example of wash sales based on boy-girl birthday collisions of a single day.
Section 3 generalizes results of the previous sections. In particular, it shows how to compute
Subsection 3.1 gives an example of wash sales based on boy-girl birthday collisions over a range of 
Finally, Section 4 explores how wash sales impact capital gains and losses. Since wash sales are capital losses, they may offset capital gains. Several results, including the Littlewood-Offord problem, are applied to capital gains and losses as they may be impacted by wash sales.
2. The Birthday Problem and Wash Sales
The birthday problem is often applied to finding the probability of coincidences. So there is a rich literature on variations of the birthday problem [29] [30] . Asset sales are often viewed as carefully selected. However, portfolios using American-style options may exhibit asset sales or purchases beyond the control of the portfolio managers.
A key question is: Over n consecutive days for what integer k does

given n days, what is the least k iid uniform random variables so that
Solutions to this basic variation of the birthday problem are well known. The probability 
then k birthdays can be in 



elements of 


for 

Starting with n and a probability



Another classical approach is to look at the random variable X as the sum of all birthday-collisions of k people over n days, see for example [19] [25] [35] [36] . A concise exposition is given in [36] which we follow. Presume the birthday of person 

a Bernoulli trial, so X is binomially distributed. Thus, 







In the case of the 


Two birthdays 






The next definition is based on [16] [17] [29] .
Definition 4 (±d Birthday Collisions) Consider n days in a year, spans of less than 



In n days with a 

there is a probability of at least 1/2 where at least two such random variables are fewer than d days from each other.
Definition 5 (Blocks of days) Let








A block of days contains a single birthday on one of its end-points. The birthday 


The days between 






Take k iid uniform random variables and consider 









pings of the k random variables. Thus, to get the probability of at least one 

Theorem 1 ( [16] ).

for 

Using the bound 


Note, Theorem 1 with 


The falling factorial is

In these terms, Theorem 1 may be expressed as
The next classic result is important.
Lemma 1 (Classical) Let



The next definition is based on [18] [20] [23] .
Definition 6 (Boy-Girl Birthdays) Consider n days in a year and two sets of dis- tinctly labeled iid uniform random variables all with range

For instance, in n days, 


Stirling numbers of the second kind [37] count the number of non-empty partitions of a given set. For example given the set

non-empty subsets is
Due to their nature, it is common to define Stirling numbers of the second kind
recursively [37] : 





The next classical equality counts the number of functions from 



expressed as the number of non-empty i partitions of the 
Theorem 2 ( [18] [20] ) Consider n days in a year and two sets of distinctly labeled iid uniform random variables all with range


The next Lemma is from [18] [38] .
Lemma 2 ( [18] [38] ) Consider n days in a year and two sets of distinctly labeled iid random variables all with range


Wash Sale Example 1: Same Day Purchase and Sale
Consider a portfolio 











Suppose portfolio 
asset 

Take 



for


To apply a suitable version of Chernoff's bound ( [39] , Appendix A) where


So, for example, take



Select the probabilities that the number of buys and sales are the same, given 

Let h be half the total trades


In fact, 


Assuming the portfolio 
3. General Wash Sales
Necessary conditions are given here for wash sales where a purchase and sale are within 

Definition 7 (Boy-Girl 



For example, starting with 




and one boy have 
The next result is based on [16] [18] [20] [38] .
Theorem 3. Consider n days in a year, a span of 




Proof. This proof calculates the probability of not having no boy-girl 


Given n days, a 


The value 





injective functions to 




Now, consider placing the i and j partitions in separate locations among the 






mappings of boys to i non-empty partitions and independently the number of injective
mappings of girls to j non-empty partitions.
This completes the proof.
Wash Sale Example 2: d = ±30 Calendar Days
Start with the same setup as the previous wash sale example from subsection 2.1.
Let h be half the total trades 




Consider only a single asset type. The intuition behind these probabilities is straight- forward. For instance, consider 
4. Wash Sale and Integral Capital Gains and Losses
Capital gains or capital losses may be rounded to the nearest integer for US tax calculations. Provided all trades are rounded. Rounding drops the cents portion for gains whose cents portion is 50-cents or below. Rounding adds a dollar to the dollar portion of gains whose cents portion is greater than 50 cents while dropping the cents portion. Losses work the same way. Gains and losses must all be rounded or none must be rounded. So, from here on, let all gains or losses be integers.
Long term capital gains and losses are aggregated and at the same time short term capital gains and losses are aggregated. At the end of the tax year the long term and short term aggregates are added together to get the final capital gain or loss for taxation.
The focus here is capital gains or losses for capital assets that may have wash sales. Wash sales are losses, but losses may offset gains. The study of options and their associated premiums is classical [10] and we do not address it here. So, option premiums are ignored.
In a portfolio, individual capital gain values and individual capital loss values are usually distinct. Though rare, identical capital gains and capital losses are possible. Identical capital gains or losses are possible for portfolios built using options. We are ignoring option premiums. That is, asset purchases may be done via the exercise of cash-covered American-style put options. Also asset sales may be done via the exercise of American-style covered-call options. In these cases with options that become in-the-money, a portfolio manager has no control of the asset sales or purchases or timing of such trades. See Figure 1.
Most often, put or call option strike prices are at discrete increments. For example, many put and call equity options have strike prices in $5 or $10 increments. Suppose a portfolio is built only using the exercise of American-style options. Many asset gains and losses may be for identical amounts. Of course, this depends on the size of the underlying positions or the number of options written. Options with the same expiry on identically sized underlying assets may have very different values [10] .
Figure 1. A potential wash sale with American-style options. Each row represents the same underlying asset type.
In such option-based portfolios assume uniform, independent, and random capital gains and capital losses. This may be modeled by the Littlewood-Offord Problem.
Definition 8 is classical and extensive discussion may be found in the likes of [6] [41] . It is based directly on [4] [6] [41] .
Definition 8 (Littlewood-Offord Problem) The integer Littlewood and Offord’s problem is given an integer multi-set 






Assuming equal probability of gains and losses and no drift [10] . Given an integer multi-set 





Over a tax year, the total capital gain or loss is

In an optimal solution of this version of the Littlewood-Offord problem, [5] showed
the n-element multi-set 

The next lemma’s proof follows immediately from the linearity of expectation given Rademacher random variables. See, for example, [39] .
Lemma 3. Consider any integer multi-set 





For any Rademacher random variable




Theorem 4. Consider any non-negative integer vector v and the random variable





Thus, the lowest variance, 






Theorem 4 implies the next corollary.
Corollary 1. Assume 





Corollary 1 highlights an exceptional case where all capital gains and capital losses are the same. Wash sales require the loss and gain to be from essentially the same security.
The generality of Theorem 4 asserts large variances too. Consider the set


follows since the sum is a geometric series.
Definition 9 (Distinct sums of a set or multi-set V) Consider a set or multi-set 





are distinct iff there is some

Given any multi-set of positive integers





An important observation by [5] , is that for any fixed sum s the values 



In particular, take any distinct sums 



















Thus, the set 
Figure 2. The case where 



Theorem 5. Among all sets of distinct positive integers where no two distinct sums add to the same value, the set 

Proof. Suppose, for the sake of a contradiction, that 

Take the next enumeration of the 2n distinct sums, 



Let 






The difference of any two distinct sums 




giving

which must be even.
Starting from 








Given a set of distinct positive integers V where

values, erasing a wash sale loss may have a very large impact. In particular, the multi-set 






because all losses are of the form

Since 




The following tail bound is given by [42] where



Since by Theorem 4,
Suppose 









Following Figure 2, given 






The term 
The boy-girl 



Given any number of boy-girl 




5. Conclusions and Further Directions
This paper shows the probabilistic method may be used to model some tax implications for wash sales. Variations of the birthday problem and the Littlewood-Offord problem are applied to certain tax implications of wash sales.
Modeling and simulating taxes are important in both public policy settings as well as in practical tax planning. In public policy settings, conflicting fiscal and social policies make tax rules contentious. In tax planning, unexpected events may have serious consequences. Thus, reducing certain taxes to mathematical terms gives an unusual level of percision. Such percision can only benefit public policy and tax planning.
Acknowledgements
Thanks to Noga Alon and C.-F. Lee for insightful comments.
Cite this paper
Bradford, P.G. (2016) Foundations for Wash Sales. Journal of Mathematical Finance, 6, 580-597. http://dx.doi.org/10.4236/jmf.2016.64044
References
- 1. von Mises, R. (1939) über Aufteilungs-und Besetzungs-Wahrscheinlichkeiten. Revue de la Faculté des Sciences de l’Université d’Istanbul, 4, 145-163.
- 2. Feller, W. (1968) An Introduction to Probability Theory and Its Applications. 3rd Edition, John Wiley, Hoboken.
- 3. Cormen, T., Leiserson, C., Rivest, R. and Stein, C. (2001) Introduction to Algorithms. 2nd Edition, MIT Press, Cambridge.
- 4. Littlewood, J. and Offord, A. (1943) On the Number of Real Roots of A random Algebraic Equation (III). Matematicheskii Sbornik, 12, 277-286.
- 5. Erdos, P. (1945) On a Lemma of Littlewood and Offord. Bulletin of the AMS—American Mathematical Society, 51, 898-902.
http://dx.doi.org/10.1090/S0002-9904-1945-08454-7 - 6. Tao, T. and Vu, V. (2010) A Sharp Inverse Littlewood-Offord Theorem. Random Structures & Algorithms, 37, 525-539.
http://dx.doi.org/10.1002/rsa.20327 - 7. US Internal Revenue Service, Investment Income and Expenses (including Capital Gains and Losses) (2015) IRS Publication 550, Cat. No. 15093R for 2014 Tax Returns. See Pages 59+. https://www.irs.gov/pub/irs-pdf/p550.pdf
- 8. FINRA Regulatory Notice 11-35, Effective 8-Aug-2011. https://www.finra.org/sites/default/files/NoticeDocument/p124062.pdf
- 9. Jensen, B. and Marekwica, M. (2011) Optimal Portfolio Choice with Wash Sale Constraints. Journal of Economic Dynamics and Control, 35, 1916-1937.
http://dx.doi.org/10.1016/j.jedc.2011.06.007 - 10. Hull, J. (2015) Options, Futures, and other Derivatives. 9th Edition, Pearson, New York.
- 11. Constantinides, G.M. (1983) Capital Market Equilibrium with Personal Tax. Econometrica, 51, 611-636.
- 12. Constantinides, G.M. (1984) Optimal Stock Trading with Personal Taxes: Implications for Prices and the Abnormal January Returns. Journal of Financial Economics, 13, 65-89.
http://dx.doi.org/10.1016/0304-405X(84)90032-1 - 13. Dammon, R., Spatt, C. and Zhang, H. (2001) Optimal Consumption and Investment with Capital Gains Taxes. Review of Financial Studies, 14, 583-616.
http://dx.doi.org/10.1093/rfs/14.3.583 - 14. Pat’s World Math Blog (2012).
http://pballew.blogspot.com/2011/01/who-created-birthday-problem-and-even.html - 15. Ball, W. and Coxeter, H. (1987) Mathematical Recreations and Essays. 13th Edition, Dover, New York, 45-46.
- 16. Naus, J. (1968) An Extension of the Birthday Problem. The American Statistician, 22, 27- 29.
http://dx.doi.org/10.2307/2681879 - 17. Abramson, M. and Moser, W. (1970) More Birthday Surprises. American Mathematical Monthly, 77, 856-858.
http://dx.doi.org/10.2307/2317022 - 18. Crilly, T. and Nandy, S. (1987) The Birthday Problem for Boys and Girls. The Mathematical Gazette, 71, 19-22.
http://dx.doi.org/10.2307/3616281 - 19. Pinkham, R. (1988) A Convenient Solution to the Birthday Problem for Girls and Boys. The Mathematical Gazette, 72, 129-130.
http://dx.doi.org/10.2307/3618930 - 20. Nishimura, K. and Sibuya, M. (1988) Occupancy with Two Types of Balls. Annals of the Institute of Statistical Mathematics, 40, 77-91.
http://dx.doi.org/10.1007/BF00053956 - 21. Galbarith, S. and Holmes, M. (2012) A Non-Uniform Birthday Problem with Applications to Discrete Logarithms. Discrete Applied Mathematics, 160, 1547-1560.
http://dx.doi.org/10.1016/j.dam.2012.02.019 - 22. Selivanov, B. (1995) On the Waiting Time in a Scheme for the Random Allocation of Colored Particles. Discrete Mathematics and Applications, 5, 73-82.
http://dx.doi.org/10.1515/dma.1995.5.1.73 - 23. Chatterjee, S., Diaconis, P. and Meckes, E. (2005) Exchangeable Pairs and Poisson Approximation. Probability Surveys, 2, 64-106.
http://dx.doi.org/10.1214/154957805100000096 - 24. Arratia, R., Goldstein, L. and Gordon, L. (1990) Poisson Approximation and the Chen- Stein Method. Statistical Science, 5, 403-424.
- 25. DasGupta, A. (2005) The Matching, Birthday and the Strong Birthday Problem: A Contemporary Review. Journal of Statistical Planning and Inference, 130, 377-389.
http://dx.doi.org/10.1016/j.jspi.2003.11.015 - 26. Bradford, P., Perevalova, I., Smid, M. and Ward, C. (2006) Indicator Random Variables in Traffic Analysis and the Birthday Problem. 31st Annual IEEE Conference on Local Computer Networks (LCN 2006), Tampa, 14-16 November 2006, 1016-1023.
http://dx.doi.org/10.1109/lcn.2006.322217 - 27. Stinson, D. (2005) Cryptography Theory and Practice. 3rd Edition, CRC Press, Boca Raton.
- 28. Song, R., Green, T., McKenna, M. and Glynn M. (2007) Using Occupancy Models to Estimate the Number of Duplicate Cases in a Data System without Unique Identifiers. Journal of Data Science, 5, 53-66.
- 29. Diaconis, P. and Mosteller, F. (1989) Methods for Studying Coincidences. Journal of the American Statistical Association, 84, 853-861.
http://dx.doi.org/10.1080/01621459.1989.10478847 - 30. DasGupta, A. (2004) Sequences, Patterns, and Coincidences.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.121.8367 - 31. Apoport, A. (1998) Birthday Problems: A Search for Elementary Solutions. The Mathematical Gazette, 82, 111-114.
http://dx.doi.org/10.2307/3620175 - 32. Flajolet, P., Gardy, D. and Thimonier, L. (1992) Birthday Paradox, Coupon Collectors, Caching Algorithms and Self-Organizing Search. Discrete Applied Mathematics, 39, 207- 229.
http://dx.doi.org/10.1016/0166-218X(92)90177-C - 33. Motwani, R. and Raghavan, P. (1995) Randomized Algorithms. Cambridge University Press, Cambridge.
http://dx.doi.org/10.1017/CBO9780511814075 - 34. Mitzenmacher, M. and Upfal, E. (2005) Probability and Computing. Cambridge University Press, Cambridge.
http://dx.doi.org/10.1017/CBO9780511813603 - 35. Blom, G., Holst, L. and Sandell, D. (1994) Problems and Snapshots from the World of Probability. Springer, New York.
http://dx.doi.org/10.1007/978-1-4612-4304-5 - 36. Pinkham, R. (1985) 69.32 The Birthday Problem, Pairs and Triples. The Mathematical Gazette, 69, 279.
http://dx.doi.org/10.2307/3617572 - 37. Graham, R., Knuth, D. and Patashnik, O. (1994) Concrete Mathematics: A Foundation for Computer Science. Addison Wesley, Boston.
http://dx.doi.org/10.2307/3617572 - 38. Wendl, M. (2003) Collision Probability between Sets of Random Variables. Statistics & Probability Letters, 64, 249-254.
http://dx.doi.org/10.1016/S0167-7152(03)00168-8 - 39. Alon, N. and Spencer, J.H. (2008) The Probabilistic Method. 3rd Edition, Wiley, Hoboken.
http://dx.doi.org/10.1002/9780470277331 - 40. Nguyen, H. and Vu, V. (2012) Small Ball Probability, Inverse Theorems, and Applications.
http://arxiv.org/abs/1301.0019 - 41. Tao, T. and Vu, V. (2006) Additive Combinatorics. Cambridge University Press, Cambridge.
http://dx.doi.org/10.1017/CBO9780511755149 - 42. Montgomery-Smith, S. (1990) The Distribution of Rademacher Sums. Proceedings of the American Mathematical Society, 109, 517-522.
http://dx.doi.org/10.1090/S0002-9939-1990-1013975-0
NOTES
1Options, like shares of stock, are fungible and there are specific option exercise assignment allocation methods used to allocate exercised options [8] .
2We used Bernoulli random variables for 







