ManifoldMarketManager.rule.manifold.other

Contains rules that reference other Manifold markets.

class ManifoldMarketManager.rule.manifold.other.AmplifiedOddsRule(id_: str = None, slug: Optional[str] = None, url: Optional[str] = None, seed: int | float | str | bytes | bytearray = b'\x8b\x8b\x04d\xa9\xccR"\x8d\xdf\xf4(6\xa7Y\xbf', method: str = 'random', rounds: int = 1, args: Sequence[Any] = (), kwargs: JSONDict = NOTHING, a: int = 1)[source]

Bases: OtherMarketValue[Union[Literal[‘CANCEL’], bool, float]], ResolveRandomSeed

Immitate the amplified odds scheme deployed by @Tetraspace.

This rule resolves YES if the referenced market resolves YES.

If the referenced market resolves NO, I will get a random number using a predetermined seed. If it is less than 1 / a, I will resolve NO. Otherwise, I will resolve N/A. This means that, for this rule, you should treat NO as if it is a times less likely to happen than it actually is.

For example, if a = 100, and your actual expected outcome is 0.01% YES, 99.99% NO, you should expect this to resolve with probabilities 0.01% YES, 0.9999% NO, 98.9901% N/A, which means that your price of a YES share should be ~1% (actually 0.99%).

Some other values, for calibration (using the formula YES’ = YES/(YES + (1-YES)/100), where YES’ is the price for this question, and YES is your actual probability): 0.02% YES => ~2% YES’ (actually 1.96%) 0.05% YES => ~5% YES’ (actually 4.76%) 0.1% YES => 9% YES’ 0.2% YES => 17% YES’ 0.5% YES => 33% YES’ 1% YES => 50% YES’ 2% YES => 67% YES’ 5% YES => 84% YES’ 10% YES => 92% YES’ 20% YES => 96% YES’ 50% YES => 99% YES’ 100% YES => 100% YES’

_abc_impl = <_abc_data object>
_binary_value(market: Market, mkt: APIMarket | None = None) float
_explain_abstract(indent: int = 0, **kwargs: Any) str[source]
_explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str[source]
_is_protocol = False
_value(market: Market) BinaryResolution[source]
a: int
api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) APIMarket

Return an APIMarket object associated with this rule’s market.

args: Sequence[Any]
explain_abstract(indent: int = 0, **kwargs: Any) str

Explain how the market will resolve and decide to resolve.

explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str

Explain why the market is resolving the way that it is.

f_api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) Future[APIMarket]

Return a Futures which resolves to the APIMarket object associated with this rule’s market.

classmethod from_dict(env: ModJSONDict) T

Take a dictionary and return an instance of the associated class.

id_: str
kwargs: JSONDict
logger: Logger
method: str
rounds: int
seed: int | float | str | bytes | bytearray
slug: Optional[str]
tags_used: set[str]
url: Optional[str]
value(market: Market, format: Literal['NONE'] | OutcomeType = 'NONE', refresh: bool = False) AnyResolution

Return the resolution value of a market, appropriately formatted for its market type.

class ManifoldMarketManager.rule.manifold.other.OtherMarketClosed(id_: str = None, slug: Optional[str] = None, url: Optional[str] = None)[source]

Bases: DoResolveRule, ManifoldMarketMixin

A rule that checks whether another market is closed.

_abc_impl = <_abc_data object>
_explain_abstract(indent: int = 0, **kwargs: Any) str[source]
_explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str
_is_protocol = False
_value(market: Market) bool[source]
api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) APIMarket

Return an APIMarket object associated with this rule’s market.

explain_abstract(indent: int = 0, **kwargs: Any) str

Explain how the market will resolve and decide to resolve.

explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str

Explain why the market is resolving the way that it is.

f_api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) Future[APIMarket]

Return a Futures which resolves to the APIMarket object associated with this rule’s market.

classmethod from_dict(env: ModJSONDict) T

Take a dictionary and return an instance of the associated class.

id_: str
logger: Logger
slug: Optional[str]
tags_used: set[str]
url: Optional[str]
value(market: Market, format: Literal['NONE'] | OutcomeType = 'NONE', refresh: bool = False) AnyResolution

Return the resolution value of a market, appropriately formatted for its market type.

class ManifoldMarketManager.rule.manifold.other.OtherMarketResolved(id_: str = None, slug: Optional[str] = None, url: Optional[str] = None)[source]

Bases: DoResolveRule, ManifoldMarketMixin

A rule that checks whether another market is resolved.

_abc_impl = <_abc_data object>
_explain_abstract(indent: int = 0, **kwargs: Any) str[source]
_explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str
_is_protocol = False
_value(market: Market) bool[source]
api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) APIMarket

Return an APIMarket object associated with this rule’s market.

explain_abstract(indent: int = 0, **kwargs: Any) str

Explain how the market will resolve and decide to resolve.

explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str

Explain why the market is resolving the way that it is.

f_api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) Future[APIMarket]

Return a Futures which resolves to the APIMarket object associated with this rule’s market.

classmethod from_dict(env: ModJSONDict) T

Take a dictionary and return an instance of the associated class.

id_: str
logger: Logger
slug: Optional[str]
tags_used: set[str]
url: Optional[str]
value(market: Market, format: Literal['NONE'] | OutcomeType = 'NONE', refresh: bool = False) AnyResolution

Return the resolution value of a market, appropriately formatted for its market type.

class ManifoldMarketManager.rule.manifold.other.OtherMarketUniqueTraders(id_: str = None, slug: Optional[str] = None, url: Optional[str] = None)[source]

Bases: ManifoldMarketMixin, Rule[int]

A rule that checks whether another market is resolved.

_abc_impl = <_abc_data object>
_explain_abstract(indent: int = 0, **kwargs: Any) str[source]
_explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str
_is_protocol = False
_value(market: Market) int[source]
api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) APIMarket

Return an APIMarket object associated with this rule’s market.

explain_abstract(indent: int = 0, **kwargs: Any) str

Explain how the market will resolve and decide to resolve.

explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str

Explain why the market is resolving the way that it is.

f_api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) Future[APIMarket]

Return a Futures which resolves to the APIMarket object associated with this rule’s market.

classmethod from_dict(env: ModJSONDict) T

Take a dictionary and return an instance of the associated class.

id_: str
logger: Logger
slug: Optional[str]
tags_used: set[str]
url: Optional[str]
value(market: Market, format: Literal['NONE'] | OutcomeType = 'NONE', refresh: bool = False) AnyResolution

Return the resolution value of a market, appropriately formatted for its market type.

class ManifoldMarketManager.rule.manifold.other.OtherMarketValue(id_: str = None, slug: Optional[str] = None, url: Optional[str] = None)[source]

Bases: Rule[T], ManifoldMarketMixin

A rule that resolves to the value of another rule.

_abc_impl = <_abc_data object>
_binary_value(market: Market, mkt: APIMarket | None = None) float[source]
_explain_abstract(indent: int = 0, **kwargs: Any) str[source]
_explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str[source]
_is_protocol = False
_value(market: Market) T[source]
api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) APIMarket

Return an APIMarket object associated with this rule’s market.

explain_abstract(indent: int = 0, **kwargs: Any) str

Explain how the market will resolve and decide to resolve.

explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str

Explain why the market is resolving the way that it is.

f_api_market(client: Optional[ManifoldClient] = None, market: Optional[Market] = None) Future[APIMarket]

Return a Futures which resolves to the APIMarket object associated with this rule’s market.

classmethod from_dict(env: ModJSONDict) T

Take a dictionary and return an instance of the associated class.

id_: str
logger: Logger
slug: Optional[str]
tags_used: set[str]
url: Optional[str]
value(market: Market, format: Literal['NONE'] | OutcomeType = 'NONE', refresh: bool = False) AnyResolution

Return the resolution value of a market, appropriately formatted for its market type.