MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simple Stock Options Calculation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105571] Re: [mg105543] Simple Stock Options Calculation
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 9 Dec 2009 05:44:32 -0500 (EST)
  • References: <200912081143.GAA29161@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

I'd prefer something like

pricepercontract = .71;
feepercontract = .75;
tradecomission = 9.99;
totalcost = 25000;
limit = Rationalize[
   100*pricepercontract*numbercontracts*feepercontract +
     tradecomission <= totalcost]
Maximize[{numbercontracts, limit}, numbercontracts, Integers]

999/100 + (213 numbercontracts)/4 <= 25000

{469, {numbercontracts -> 469}}

Bobby

On Tue, 08 Dec 2009 05:43:30 -0600, Nicholas Kormanik  
<nkormanik at gmail.com> wrote:

>
> Trying to set up way to find the number of options contracts one can
> purchase with a given amount of money.  Could someone please edit the
> code if needed?  Or does this look okay as is?
>
> Thanks.....
>
>
> pricepercontract := .71
> numbercontracts := x
> feepercontract := .75
> tradecomission := 9.99
> totalcost := 25000
>
> Solve[100*pricepercontract*numbercontracts*feepercontract +
>    tradecomission == totalcost, x]
>
>
>
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Problem with FramedStyle when using inside Framed[]
  • Next by Date: strange effect of using Item[] around Control[] in Manipulate[]
  • Previous by thread: Re: Simple Stock Options Calculation
  • Next by thread: 3D graphics rendering is slow (Nvidia Quadro card)