Sha256: f6f383c7ebe84d291660fd8d82e6e782ee6f2e821199de807f8faed671fa934b

Contents?: true

Size: 845 Bytes

Versions: 2

Compression:

Stored size: 845 Bytes

Contents

class ::IshManager::IroPursesController < IshManager::ApplicationController

  before_action :set_lists

  def show
    @purse = Iro::Purse.find_or_create_by({ user_id: current_user.id })
    authorize! :my, @purse
    @positions = @purse.positions.order({ expires_on: :asc, strike: :asc })
    @positions.map &:refresh
    @strategies = Iro::CoveredCallStrategy.where({
      iro_purse_id: Iro::Purse.find_by( user_id: current_user.id ).id,
    })
  end

end

=begin
    @strategy = {
      buffer_above_water: 0.49, # be this much $ above current price, in next position
      next_max_delta: 0.25, # of next position
      next_min_price: 16,
      threshold_delta: 0.14, # should roll at this delta
      threshold_netp: 0.69, # should roll at the net %
      target_profilt: 0.19, # unused
      current_underlying_strike: 16.6,
    }
=end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ish_manager-0.1.8.404 app/controllers/ish_manager/iro_purses_controller.rb
ish_manager-0.1.8.403 app/controllers/ish_manager/iro_purses_controller.rb