# Market Logic II

*This continues* [*yesterday's post*](https://www.lesswrong.com/posts/g8RBkTf9uGTq9ypub/market-logic-i)*, picking up mid-thought; read yesterday's first if you haven't. NOTE: I'll make some light edits to yesterday's post as I write this one, to make sure everything fits together.*

As I was saying...

**Our task is to study the space of financial derivatives.**

We want to specify a market-maker who is "very helpful", IE, facilitates a broad variety of transactions. These transactions will then give us our logic.

A "derivative" in finance is just a financial instrument that is somehow *derived from* an underlying financial instrument. For example, if we can invest in a good $G$, we can also bet that $G$ will be above $5¢$. The goal is to work towards derivatives such as "conjunction"; IE, if I can bet on it raining tomorrow and I can also bet on it being cloudy in the morning tomorrow, then I can derive from those things a way to bet on \[rain *and* morning clouds\]. Let's not be too hasty about introducing logical operations, however; first we want to characterize these as market goods with no semantics. We will return to the semantics later.

A financial derivative is essentially a contract, in which signatories promise specific trades based on situations. EG, you and I can agree that *provided* the price of A goes up over the next three days, on day 4 I'll sell B to you and you'll buy C from me.

In my setting, I'm assuming everything goes through a market-maker, so all contracts name two parties, a trader and the market-maker. (If two traders wanted to make a contract with each other, they can achieve the same thing by making the right contracts with the market-maker.)

I'm going to focus on contracts which *can be redeemed for a specified payoff*. EG, a bet that good $G$ will be priced above $7¢$ on day 4 is just a contract which can be redeemed at any time, and which pays out $$0$ unless the day is 4 or greater and the price of good $G$ was greater than or equal to $7¢$ on day 4.

The payoff can also be specified in other goods, EG .5 share of $G$. So, payoffs in general can be specified as a vector giving the individual payoffs in (dollars and) each good. I'll write these like $4¢ +.2 A - .5B$.$$ These aren't executed as trades -- the contract-holder isn't buying $.2$ shares of $A$ (which would involve giving the market-maker some money based on the price of $A$). Rather, the contract simply entitles the contract-holder to $4¢$, .2 shares of $A$, and .5 anti-shares of $B$. The market-maker provides the contract-holder with these things.

As with base goods, derived contracts can be purchased fractionally (entitling the holder to a fraction of the payoff) or negatively (switching the roles of market-maker and trader in the contract, IE, reversing the signs in the payoff and allowing the market-maker to decide when to redeem it).

The payoff of a contract on day $n$ can depend on any information available on day $n$, IE, the prices on that day and on any previous day, as well as the number $n$ itself. (Imagine writing some computer program that determines the payoff from those inputs.)

Contracts can get more complex than this, but the above will do for the present essay. I'm writing under time pressure; these ideas could be developed much better than what I'm achieving here.

+++ More Derivatives?

We could consider contracts which give the market-maker choices, but since the market-maker is intelligent and minimizes risks, we can calculate what the market-maker would do & fold it into the contract. (EG, offering the market-maker a choice between payouts is similar to offering a min over payouts based on their market value.) Similarly, we could consider contracts which offer the trader choices, but since the traders are also using deterministic strategies, we might as well fold these into the contract. Offering traders a choice is similar to a max over payouts based on their market value. Although traders are not necessarily rational, the market comes to be dominated by rational traders, so any distinction between a choice and a max would diminish over time. (Doing that sort of analysis is one of the benefits of this way of thinking about logic.)

Still, I think choices might be part of a more complete treatment of this topic, because the contracts I'm considering -- contracts which can be redeemed at the holder's whim -- are best represented as a choice.

We can also consider contracts that pay out periodically (IE contracts which have a payout every day, but which can be 0). These are like shares of a company that pays dividends. My redeemable contracts could be a special case of this, if we can make the payout depend on a choice (and become 0 forever after, once the choice to receive the payout is made once).

We could also consider contracts which depend on more things than just the current prices and the price history. Contracts might depend on the behavior of traders, they might be stochastic, or they might depend on some "outside facts" beyond the market.




+++

As before, the market-maker won't take on any risk itself, so it won't sell most contracts to traders unless there are also traders selling the contract. (This is unlike the case for goods, which can always be bought for some price.) As we saw with shorts, the market-maker also won't allow anyone to buy/sell contracts which they might not be able to fulfill later.

Also, like market goods, contracts need to be guaranteed to have value within $[0,1]$. So, for example, we can't have a contract which just pays out $-G$, since it might be worth as little as $-1$.

**What logic do these derivatives correspond to?**

As I mentioned earlier, $$$ corresponds to $\top$ (truth). The market-maker is always happy to give a trader $c$ shares of any good $G$ in exchange for getting $$c$, if a trader wants that; this corresponds to $G \vdash \top$ for all $G$. The market-maker will also happily accept money for nothing, corresponding to $\vdash G$.

We can similarly identify $\bot$ (false) as a contract with 0 payoff (in all circumstances). The market-maker will give this contract to anyone who wants it, with no need to give anything in return, corresponding to $\bot \vdash$. It will also accept any (positive) good in such an exchange, $\bot \vdash G$.

I've already mentioned that shorts are like negation: if you short $c$ shares of $G$, you have to set aside $$c$ as collateral, so a short can be seen as a contract with payoff $$1 - G$. This corresponds to $\neg G$. If we try to short $$$, we would get $$1-$1$, which amounts to $0$, which as we know is $\bot$; so, $\neg \top \vdash \bot$ and also $\bot \vdash \neg \top$. If I try to short a short, $\neg \neg G$=$$1-\neg G$=$$1 - ($1 - G)$=$G$. So, $G \vdash \neg \neg G$ and $\neg \neg G \vdash G$. Our logic has double-negation elimination.

Without taking on any risk, $G$ or $H$ can be exchanged for a contract I'll call $G \vee H$, which pays out $G$ or $H$, whichever has the better price.[^5t47u79tjp2] Thus, $G \vdash G\vee H$ and $H \vdash G \vee H$; this is a notion of disjunction. Clearly $G\vee H$=$H \vee G$,  and $G\vee G$=$G$.[^7mni0tv6kf6] It is obvious that $G \vee \neg G$ is not necessarily $\top$, however, as it is in classical logic: this only holds when $G$ takes on the value 1 or 0. However, it is always worth more than $50¢$.

Similarly, we can define $G \wedge H$ to pay out whichever of $G$ or $H$ is worth less.[^hzu2nksql0a] $G\wedge H \vdash G$ and $G \wedge H \vdash H$; this is a notion of conjunction. $G\wedge H$=$H \wedge G$,  and $G\wedge G$=$G$. What is the status of the classical contradiction, $G \wedge \neg G$? It can't have value more than $50¢$, but it isn't necessarily equal to $\bot$, like it would be in classical logic.

We might want to bundle two goods together, making a contract $G+H$, one share of which is worth the same as a share of $G$ and a share of $H$. However, we can't do that, due to our restriction that values must be bounded to within \[0,1\]. Instead, we can define $G\oplus H$ as redeemable for $\text{min}\big(1, p(G)+p(H)\big)$. We have $G \vdash G \oplus H$ and $H \vdash G \oplus H$, since the value of $G \oplus H$ is at least that of $G$ and at least that of $H$. This is a notion of disjunction. Unlike our other notion of disjunction, we have $G \oplus \neg G$. We have $G \oplus H$=$H \oplus G$, but we do not have $G\oplus G$=$G$. 

Similarly, we can get another notion of conjunction via $\text{max}\Big(0, 1-\big(p(\neg G)+p(\neg H)\big)\Big)$.  We have $G \otimes H$=$H \otimes G$, but we do not have $G\otimes G$=$G$. $G \otimes H \vdash G$ and $G \otimes H \vdash H$. $G \otimes \neg G$=$\bot$.

This logic appears to be very similar to the logic from [my recent post on truth](https://www.lesswrong.com/editPost?postId=bCjy3rJWLoiT6emsB&key=2f4ef428c8cd9636078441eccb955f), although I haven't checked all the details.

Is this enough? Have we finished? That is: are these logical connectives enough for us to construct whatever derivatives we like?

I believe that this set of operations gives us a universal approximator for any financial instrument we'd want (from within the class I'm considering), although I haven't been able to find a good reference for that yet. If so, this is good enough for me. There's still plenty of room to expand the set of derivatives considered, but I think what I've sketched here is indicative of the flavor of result you'd get.

I'd be eager to hear about anything similar to this which is already discussed somewhere, if you know of anything.

Conclusion
==========

There is a close connection between the math of markets and the math of cognition. Axioms of rationality can often be justified by Dutch-book arguments. However, the financial setups are often "rigged" in favor of their conclusions. For example, the law that says the probability of a statement and its negation sum to 1 can only be justified by Dutch book if we assume that the bet will certainly be resolved one way or the other. Someone who is an intuitionist when it comes to logic doesn't affirm that all statements are either true or false, so, should not be especially pursuaded by this argument.

Here, I've attempted to remove more such assumptions, by representing a general market situation (although I *have* imported *some* biases, such as the restriction of values to \[0,1\]). I've then tried to "find" the logic within this market again.

The matter is complex, but this might in some sense give us a clearer picture of what logic naturally emerges in general cognitive systems.

How can we *interpret* such a logic *as* a logic of thought? Figuring out the logic isn't enough. To someone for whom classical logic has a big appeal, my argument here may not be very convincing: since all meaningful statements *are* either true or false, what is the value of this generalization?

My tentative advice is as follows:

This logic is a logic of vagueness. In some sense, this means it is a logic of murky informal ideas which are yet to be made precise. Recognizing the halo of imprecise concepts surrounding the precise concepts can have advantages, such as for the theory of truth mentioned earlier, and perhaps studying the relationship between formal and informal concepts.

To back up this sentiment, I would want to characterize when the market comes to treat market goods classically. I also want a better characterization of "formal" vs "informal" reasoning within this (or a similar) framework.

[^5t47u79tjp2]: This is similar to providing a choice between receiving \(G\) and \(H\). 

[^7mni0tv6kf6]: By \(A\)=\(B\) I mean \(A \vdash B\) and \(B\vdash A\). 

[^hzu2nksql0a]: This is similar to giving the other party a choice of which to provide you, \(G\) or \(H\).