News for hackers. Stuff that matters.

willdearden

People have different risk exposures and different risk appetites. If you're a corn farmer then your entire livelihood is tied to the price of corn. You're willing to give up expected value to reduce risk by selling futures and there are others who are less exposed to corn prices who are willing to take the other side of that trade.
Re:Mindset Shifts for Functional Programming on Wednesday April 05, 2023 @06:40PM (#35461440)
FWIW for my comment I essentially used your code and cleaned up compiler-generated imperative code.

So yes it used the fact that it only recursed to n-1 but did not use any optimizations related to booleans. And looking at other examples can see general principles. You store a data structure for each function which acts as a cache. For example, keeping to functions of ints, if you called foo(n - k) then instead of using one register for each function it would use a size k ring buffer.

Re:Mindset Shifts for Functional Programming on Wednesday April 05, 2023 @10:30AM (#35454873)
Here's how I would write the loop version of this. It does involve an optimization since we know parity only depends on n - 1.

  #include <algorithm>
  
  template <typename T>
  bool even(T n)
  {
      bool is_even{true}, is_odd{false};
      for (; n--;)
      {
          std::swap(is_even, is_odd);
      }
      return is_even;
  }
Re:Jane Street: How to Build an Exchange on Friday January 06, 2023 @11:45PM (#34285303)
I was there until the end. It was definitely fading into obscurity but still had >50% of peak numbers. And we were switching to C++ in the last year or so.
Re:Guile Steel: a proposal for a systems Lisp on Monday July 11, 2022 @04:47PM (#32061599)
There is actually already a Scheme interpreter implemented in Rust (https://github.com/mattwparas/steel) which has the same name for the exact reasons you stated.
Veterans Affairs? Virginia?
Re:Probability and Statistics Cookbook (2011) [pdf] on Monday June 06, 2022 @12:46PM (#31642773)
There is a professor who was at Wisconsin, Charles Manski, who developed partial identification, which uses tons of these decompositions.

Idea is let's say you have a binary survey question where 80% respond and 90% of them respond "yes". What can we say about population "yes" rate (assume sample size is huge for simplicity)?

P(Yes) = P(Yes | response) * P(response) + P(Yes | no response) * P(no response) = 0.9 * 0.8 + P(Yes | no response) * 0.2 = 0.72 + P(Yes | no response) * 0.2

Then 0 <= P(Yes | no response) <= 1, so 0.72 <= P(Yes) <= 0.92. This example is somewhat trivial but it's a useful technique for showing exactly how your assumptions map to inferences.

https://www.sec.gov/news/press-release/2021-155

You absolutely can get charged for trading in a similar company.

Re:Kairos on Sunday October 10, 2021 @12:46PM (#28819824)
Reminds me of the Kairos retreats popular in Catholic high schools. I went to one and it was pretty intense and not in a forced way. Basically 4 day group therapy.
Re:SEC charges Netflix insider trading ring on Wednesday August 18, 2021 @11:41PM (#28230103)
Ah cool, are the internalized orders reported publicly anywhere or are they just sent to the SEC/FINRA?
Re:SEC charges Netflix insider trading ring on Wednesday August 18, 2021 @06:51PM (#28228141)
Most trades through a brokerage don't make it on an exchange. They're internalized by a wholesaler like Citadel Securities. Which is the reason for the question.
Re:Pay toilets and NYT: a free market microcosm on Tuesday March 09, 2021 @12:33AM (#26395738)
Probably comes from the first and second theorems of welfare economics:

https://en.wikipedia.org/wiki/Fundamental_theorems_of_welfar...

More like broker 1 offered it to me for 95 and to pay Robinhood 1. Broker 2 offered it to me for 97 and to pay Robinhood 2. Robinhood took the offer from broker 2. No collusion necessary but they weren’t acting in the best interests of their customers according to stated offers.
Re:Why are great athletes more likely to be younger siblings? on Friday December 04, 2020 @06:05PM (#25309522)
Were you a swimmer?
LTCM's blowup had nothing to do with any flaw in Black-Scholes. They did lose money on equity volatility strategies but it was because they were betting that volatility in the future would be lower than the volatility implied by Black-Scholes. Volatility ended up going up and they lost money. They lost money because their forecast of volatility was wrong, not because Black-Scholes was wrong about the market's view of volatility.
Re:JPMorgan to pay nearly $1B for metals market manipulation on Tuesday September 29, 2020 @03:25PM (#24631868)
You are legally responsible as if you had submitted the orders yourself.
Do you have people saved in your phone with the last name “Pickleball” so your phone capitalizes pickleball?
Re:The stable marriage problem and modern dating on Wednesday July 08, 2020 @03:32PM (#23773413)
There are a ton of papers on the properties of stable matching under random preferences. The classic paper (Pittel 1989 https://epubs.siam.org/doi/abs/10.1137/0402048?journalCode=s...) calculates the average rank of men and women for their partners under male-proposing Gale Shapley. They find the men's average rank is O(log(n)) and the women's average rank is O(n / log(n)). Depending on how you calculate percent advantage, that roughly matches your simulations.
Re:Shirt Without Stripes on Monday April 20, 2020 @05:19PM (#22928691)
One time I ordered from stitch fix and asked for “a shirt which is not red, white, and blue” and got a red, white, and blue shirt.
Re:Tech salaries are risk premiums on Monday February 03, 2020 @04:20PM (#22229246)
The author misunderstands risk premium, which is the extra reward the market offers in expected value to induce you to take a risky proposition over a certainty equivalent.

I think programmers’ salaries are weighed down by risk aversion. It’s tough to measure marginal impact, you don’t know want to be punished for being placed on a less productive team, etc. So salary is some function of your expected marginal productivity on an average team but scaled down by a risk premium. If you don’t want to pay this risk premium, trading is an option.