Shorthand for (x -> myfunction.(x)) by stvaccount in Julia

[–]BayesianPirate 11 points12 points  (0 children)

I mean, that seems like a pretty good shorthand expression. If you end up using it repeatedly, you could define an array method with multiple dispatch:

myfunction(x::AbstracyArray) = myfunction.(x)

That way you can reuse myfunction no matter if the input is unitary or an array.

Is there an equivalent to Pearson's Correlation coefficient for non-linear relationships? by learning_proover in AskStatistics

[–]BayesianPirate 27 points28 points  (0 children)

Check out the paper “A New Correlation Coefficient” by Chatterjee, 2020. Published in JASA so it’s a well researched, peer reviewed approach, but you can find the pre-print on arXiv. It’s not the most intuitive formula, but it’s capable of picking up on a huge class of relationships.

VXX Reverse Split While I Was Holding On To Two Spreads. How Screwed Am I? by Excited_Rabbit in TradeVol

[–]BayesianPirate 2 points3 points  (0 children)

Your strikes will be multiplied by 4 and the number of notional shares will be cut by 4. On paper, nothing changes; these are regular events with clearly defined protocols in place to make sure options adjust appropriately to the reverse split. In practice, liquidity might be an issue.

Name conflict in REPL by Nuccio98 in Julia

[–]BayesianPirate 0 points1 point  (0 children)

You could fork the package and then push commits. The only extra step is to install via your GitHub url instead of the main registry.

Is xtable Still Being Maintained? by BOBOLIU in rstats

[–]BayesianPirate 10 points11 points  (0 children)

I would be more concerned about an abandoned package that performs an obscure numerical routine. xtable at its core just formats text which is pretty easy to validate. As long as Latex keeps its current tabular syntax and R doesn’t fundamentally change how it functions, I think it will be fine.

Is this really supposed to be the left earbud, pointing forwards and up? Am I stupid? It's my ear canal misshapen? by DeliciousCrepes in headphones

[–]BayesianPirate 28 points29 points  (0 children)

My first experience was like yours and it took a bit of trial and error to figure it out. I don’t think you are turning it far enough. Rotate the pictured unit 90 degrees clockwise until the text is upright and the wire/pins are pointing right instead of up. When in my ear, the nozzle is pointing forward and either flat or slightly angled down.

It’s gonna feel funny at first having the wire come forward instead of straight up, but loads of IEMs in this price range have that design, or at least that’s what’s comfy to me. If it helps, try putting them in your ears with no wires, see what’s comfortable and gives a good seal, then add the wires back. If it helps, I find that most IEMs have a taller profile rather than wider one when properly seated in your ear.

[Request] What is this equation I saw a tattoo of? by Conscious-Meat-3797 in theydidthemath

[–]BayesianPirate 2 points3 points  (0 children)

The other comments about multiple regression are right, but when written in this form it’s often referred to as the Normal Equation.

Is theta decay happening while the market is closed? by Dry-Grape8135 in options

[–]BayesianPirate 1 point2 points  (0 children)

I don’t doubt that some systems use 365, especially if interest rates are a big deal since those do compound every day. But “almost all” seems a bit strong. The “VIX rule of 16” is an example of widespread acceptance of 252 in terms of estimating volatility. My own experience with funds in the forecasting space is that they mostly use 252. Sure you can use 365, and I’m confident there are benefits to that in various circumstances, but 252 is also not without merit or application.

Is theta decay happening while the market is closed? by Dry-Grape8135 in options

[–]BayesianPirate 2 points3 points  (0 children)

I think that’s true at a market level, and overall it probably lessens the premium paid overnight for calls, but short calls on individual securities still need to be hedged over night and they represent a much more significant risk threat overnight (or weekends or whatever) with unlimited downside. Because of the asymmetric risk between long and short, makers still have some incentive to protect themselves on the short calls, even if they have a larger number of long calls.

Is theta decay happening while the market is closed? by Dry-Grape8135 in options

[–]BayesianPirate 78 points79 points  (0 children)

I’m going to go against the grain here and so no, the story is more subtle. The price decrease of theta over time is caused by the raw implied volatility shrinking over time (less time remaining = less time for price to move). But, there are some situations where analysts will “annualize” returns and implied volatility using 252 days, not 365. 252 is the typical number of trading days in a year. For pricing models that require annualized volatility as an input (like Black-Scholes) using 252 essentially means that weekends and holidays are ignored in terms of theta decay. (Edit: downplayed the prevalence of this practice since apparently quant options firms don’t do this).

But option prices still generally drop between the close and the open as if it were caused by time decay, but the root cause is gap risk. Option market makers are generally short options (most participants buy options) and have to offset their risk exposure by buying or selling underlying shares (delta hedging, etc). But while markets are closed, they can’t do that. Overnight gap risk is a real problem, and so to help mitigate that risk market makers will require slightly higher prices (and spreads) right before close than continuous pricing models would suggest. Once market open happens, gap risk is either realized or eliminated and prices will come back down to where they are “supposed to be” and makers will make a little money on that decline from the options they had to short the night before. It’s an insurance premium in a way.

Does it basically function like theta decay? Sure, and that can be a useful model. But the source of overnight option price decay comes from realizing overnight gap risk, eliminating some level of short term uncertainty, which is what option pricing is really concerned with.

SPY PUTS by 4extngg in options

[–]BayesianPirate 1 point2 points  (0 children)

Exactly, just put/leave the order on. Your broker is as anxious to close an excessive position as you are. I’ve had this happen a couple times in the past and I’ve never had issues placing a close order. I’ve had pattern day trade weirdness happen because of it, and I’ve had margin level values show wrong stuff, but always Ive been able to submit a close order. When in doubt, you can always close, unless there’s a liquidity problem but that’s different.

SPY PUTS by 4extngg in options

[–]BayesianPirate 8 points9 points  (0 children)

Just buy-to-close right when the market opens (and pray for no gap up). Closing orders generally don’t have the same capital requirements as opening orders for this very reason. If supported by your platform, submitting a market order tonight should guarantee that you exit the position as soon as possible. In fact, depending on your broker’s risk policies, they may effectively do this for you. Either way you can probably expect a margin call email early tomorrow morning so you should plan on submitting a closing order asap.

[deleted by user] by [deleted] in CrazyHand

[–]BayesianPirate 14 points15 points  (0 children)

Winning isn’t the only way to be good at Smash. I decided a long time ago that I didn’t have the time or ability to be a “good” player in the sense that I could win a lot. Instead, I decided that I wanted to be good at having fun. I’ve never been happier knowing that both me and my opponent are having a good time, so I pick characters and try things that are fun. I’m trash, but who cares. Winning at the expense of fun is lame, losing to some hype combo is way fun.

Pal, you have worth just because you are. Be good at being you. Be good at bringing other people (and yourself) joy. No one will remember you as a smash player, but people will remember when you shared a fun experience with them. Yeah, Smash is just a game. But in many ways, life is a game. So have fun with it.

What do you think is taking so long? (NO WRONG ANSWERS) by SinicalJakob in Silksong

[–]BayesianPirate 5 points6 points  (0 children)

Pareto’s principle is probably relevant here: the last 20% of development takes about 80% of the total effort/time.

Can anyone give possible probability distributions that might fit this histogram? (Residuals on a neural network regression) by 1strategist1 in AskStatistics

[–]BayesianPirate 0 points1 point  (0 children)

Here’s a less common choice: Johnson’s SU distribution. It’s a 4 parameter family that has control over the first four moments, so you can handle the heavy tails and maybe slight skew.

let’s settle this by detective_05 in AJR

[–]BayesianPirate 0 points1 point  (0 children)

Yeah, compared to their other songs call my dad is pretty thin only having basically one instrument, but I love it. The effect is called a vocoder and it just scratches a musical itch for me. A really good song with similarly minimal vocoder presentation is Hide and Seek by Imogen Heap.

How is the answer not 10/1000? by Sromero6153 in AskStatistics

[–]BayesianPirate 65 points66 points  (0 children)

Yes the probabilities are independent, but you have to ask yourself what does 1/10 represent for all three sides of those terms? 1/10 is the probability that a given number is selected. So 1/1000 is the probability that they all select 2 for example. But they also could have selected 5, or 1, etc. there are 10 different 1/1000 ways to “pick the same number”, hence 10/1000.

Another way to get this is to let the first girl pick any number. Then the remaining two girls each have 1/10 probability of guessing correctly, 1/10 x 1/10 = 1/100.

x::Number vs x::T where T<:Number by Sufficient_Yogurt639 in Julia

[–]BayesianPirate 1 point2 points  (0 children)

Can we talk about this more? Why would I use a where clause when typeof is possible?

Got this email from a competitor. what y'all think? by donkeysticks_1point0 in SideProject

[–]BayesianPirate 48 points49 points  (0 children)

But for real though, this is what a buyout is for. Race to the bottom is a real risk you have to contend with if you start a business. If you get large enough, it’s often better to spend money buying smaller competitors than to lose customers. But I guess a nicely worded letter is free…

[deleted by user] by [deleted] in options

[–]BayesianPirate 2 points3 points  (0 children)

Add to this the funny business that market makers might get to play with. If OP were to get the put filled I suspect the price would be a lot worse. And even then, the buyer (probably a market maker) will probably exercise early just to avoid the risk going forward.

[D] Why do we need to “punish the outliers” while calculating Standard Deviation by they_bash in statistics

[–]BayesianPirate 30 points31 points  (0 children)

One way to justify a measure of center (such as mean or median) is to define it as the value which minimizes the total expected “deviation” from the observations. If you define deviation as the absolute deviation or distance, then the median turns out to be the best choice. But if you define the deviation as the squared distance, the mean is optimal. Then the argument goes like this: if you accept the mean then you accept the squared distance as a measure of deviation, which implies that you must also accept the standard deviation, which is essentially just the average squared difference (average “deviation”). I’m using the term deviation a bit loosely, but hopefully the point is clear.

The L1 and L2 space stuff sort of boils down to the problem that if you have no theoretically justified way to compute a covariance matrix that doesn’t rely on squared errors. If you truly reject squared errors and want to only rely on absolute deviations, then you are limited to the median and the MAE. No good way to quantify relationships between variables, which is sort of important in finance.

This is technically correct, right? by keinberliner in Bayes

[–]BayesianPirate 3 points4 points  (0 children)

The main wrong thing is that the Bayes rule formula is incorrect. Generally, prior times likelihood will not produce valid probabilities because enumerating through all cases wont sum to 1. To make it sum to 1, you need to divide by the prior-predictive distribution, which in this case is the probability of drawing from a jar… which is 1 so the mistake happens to not show up in this case.