Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Suppress Resizing in Manipulate[expr].

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128372] Re: Suppress Resizing in Manipulate[expr].
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Wed, 10 Oct 2012 01:27:13 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20121009043647.7E225685E@smc.vnet.net>

Manipulate[
 Row[{
   "Volatility:"^Style["1", White],
   NumberForm[vol // N, {4, 3}],
   Spacer[12],
   "Strike Price: ",
   NumberForm[strike, {6, 5}],
   Spacer[12],
   "Expiration: ",
   NumberForm[expiry // N, {6, 5}],
   Spacer[20],
   NumberForm[
    FinancialDerivative[
     {"BarrierDownIn", "European", "Put"},
     {"StrikePrice" -> strike,
      "Expiration" -> expiry,
      "Barrier" -> 11/10,
      "Rebate" -> 0},
     {"CurrentPrice" -> 12/10,
      "Dividend" -> 0,
      "Volatility" -> vol,
      "InterestRate" -> 1/100}],
    {7, 6}]}],
 Row[{
   Control[{{vol, .1, "Volatility\n"}, .1, .7,
     Appearance -> "Labeled", ImageSize -> Small}],
   Control[{{strike, 1, "Strike\nPrice"}, 1, 2,
     Appearance -> "Labeled", ImageSize -> Small}],
   Control[{{expiry, .25, "Expiration\n"}, .25, 1.5,
     Appearance -> "Labeled", ImageSize -> Small}]}]]


Bob Hanlon


On Tue, Oct 9, 2012 at 12:36 AM, Matthias Bode <lvsaba at hotmail.com> wrote:
> Hola:
> The documentation shows how to suppress resizing in Manipulate[Plot[]].
> I want to suppress resizing in
> Manipulate[{"vol:", N[vol, 4],      "strike:", N[strike, 6],   "expiry:", N[expiry, 6],      N[FinancialDerivative[         {"BarrierDownIn",        "European", "Put"},          {"StrikePrice" -> strike,            "Expiration" -> expiry,            "Barrier" -> 11/10,            "Rebate" -> 0},          {"CurrentPrice" -> 12/10,   "Dividend" -> 0,            "Volatility" -> vol,            "I nterestRate" -> 1/100}],        6]}, {{vol, 1/10}, 1/10,      7/10}, {{strike, 1}, 1, 2},    {{expiry, 1/4}, 1/4, 6/4}]
> How?
> (Using NumberForm[] almost suppresses resizing; but, alas, not totally.)
>
> Best regards,
>
> MATTHIAS BODE
> S 17.36398=B0, W 66.21816=B0,2'590 m. AMSL.



  • Prev by Date: Re: color function
  • Next by Date: Re: maximization with array of constraints
  • Previous by thread: Suppress Resizing in Manipulate[expr].
  • Next by thread: Re: Using a huge list of random numbers from random.org