diff --git a/ql/experimental/mcbasket/Makefile.am b/ql/experimental/mcbasket/Makefile.am
index a68ef40..0dda0bb 100644
--- a/ql/experimental/mcbasket/Makefile.am
+++ b/ql/experimental/mcbasket/Makefile.am
@@ -5,6 +5,7 @@ this_includedir=${includedir}/${subdir}
 this_include_HEADERS = \
     all.hpp \
     adaptedpathpayoff.hpp \
+    externalpayoff.hpp \
     longstaffschwartzmultipathpricer.hpp \
     mcamericanpathengine.hpp \
     mclongstaffschwartzpathengine.hpp \
@@ -14,6 +15,7 @@ this_include_HEADERS = \
 
 libMcBasket_la_SOURCES = \
     adaptedpathpayoff.cpp \
+    externalpayoff.cpp \
     longstaffschwartzmultipathpricer.cpp \
     mcpathbasketengine.cpp \
     pathmultiassetoption.cpp
diff --git a/ql/experimental/mcbasket/all.hpp b/ql/experimental/mcbasket/all.hpp
index f32ab40..9d70e10 100644
--- a/ql/experimental/mcbasket/all.hpp
+++ b/ql/experimental/mcbasket/all.hpp
@@ -2,6 +2,7 @@
 /* Add the files to be included into Makefile.am instead. */
 
 #include <ql/experimental/mcbasket/adaptedpathpayoff.hpp>
+#include <ql/experimental/mcbasket/externalpayoff.hpp>
 #include <ql/experimental/mcbasket/longstaffschwartzmultipathpricer.hpp>
 #include <ql/experimental/mcbasket/mcamericanpathengine.hpp>
 #include <ql/experimental/mcbasket/mclongstaffschwartzpathengine.hpp>
diff --git a/ql/experimental/mcbasket/externalpayoff.cpp b/ql/experimental/mcbasket/externalpayoff.cpp
new file mode 100644
index 0000000..3a6bdb2
--- /dev/null
+++ b/ql/experimental/mcbasket/externalpayoff.cpp
@@ -0,0 +1,102 @@
+/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/*
+ Copyright (C) 2010 Andrea Odetti
+
+ This file is part of QuantLib, a free-software/open-source library
+ for financial quantitative analysts and developers - http://quantlib.org/
+
+ QuantLib is free software: you can redistribute it and/or modify it
+ under the terms of the QuantLib license.  You should have received a
+ copy of the license along with this program; if not, please email
+ <quantlib-dev@lists.sf.net>. The license is also available online at
+ <http://quantlib.org/license.shtml>.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE.  See the license for more details.
+*/
+
+#include <ql/experimental/mcbasket/externalpayoff.hpp>
+
+namespace {
+
+    using namespace QuantLib;
+
+    class ExternalPayoffWrapper : public PathPayoff {
+    public:
+	ExternalPayoffWrapper(const ExternalOption & external);
+
+        virtual std::string name() const;
+        virtual std::string description() const;
+        virtual void value(const Matrix       & path, 
+                           Array              & payments, 
+                           Array              & exercises, 
+                           std::vector<Array> & states) const;
+        virtual Size basisSystemDimension() const;
+    private:
+	/*
+	  Care has to be taken to ensure "this" object does not
+	  live longer than "external_"
+	 */
+	const ExternalOption & external_;
+    };
+
+    ExternalPayoffWrapper::ExternalPayoffWrapper(const ExternalOption & external) 
+	: external_(external) {
+    }
+    
+    std::string ExternalPayoffWrapper::name() const {
+	return typeid(this).name();
+    }
+
+    std::string ExternalPayoffWrapper::description() const {
+	return typeid(this).name();
+    }
+
+    void ExternalPayoffWrapper::value(const Matrix       & path, 
+				      Array              & payments, 
+				      Array              & exercises, 
+				      std::vector<Array> & states) const {
+	return external_.value(path, payments, exercises, states);
+    }
+
+    Size ExternalPayoffWrapper::basisSystemDimension() const {
+	return external_.basisSystemDimension();
+    }
+
+    class ExternalPathOptionWrapper : public PathMultiAssetOption {
+    public:
+        ExternalPathOptionWrapper(const ExternalOption & external);
+
+        virtual boost::shared_ptr<PathPayoff> pathPayoff()  const;
+        virtual std::vector<Date>             fixingDates() const;
+    private:
+	/*
+	  Care has to be taken to ensure "this" object does not
+	  live longer than "external_"
+	 */
+        const ExternalOption & external_;
+    };
+
+    ExternalPathOptionWrapper::ExternalPathOptionWrapper(const ExternalOption & external)
+	: external_(external) {
+    }
+
+    std::vector<Date> ExternalPathOptionWrapper::fixingDates() const {
+	return external_.fixingDates();
+    }
+    
+    boost::shared_ptr<PathPayoff> ExternalPathOptionWrapper::pathPayoff() const {
+	return boost::shared_ptr<PathPayoff>(new ExternalPayoffWrapper(external_));
+    }
+
+}
+
+namespace QuantLib {
+
+    boost::shared_ptr<Instrument> ExternalOption::option() const {
+	return boost::shared_ptr<Instrument>(new ExternalPathOptionWrapper(*this));
+    }
+
+}
diff --git a/ql/experimental/mcbasket/externalpayoff.hpp b/ql/experimental/mcbasket/externalpayoff.hpp
new file mode 100644
index 0000000..7dd532b
--- /dev/null
+++ b/ql/experimental/mcbasket/externalpayoff.hpp
@@ -0,0 +1,66 @@
+/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/*
+ Copyright (C) 2010 Andrea Odetti
+
+ This file is part of QuantLib, a free-software/open-source library
+ for financial quantitative analysts and developers - http://quantlib.org/
+
+ QuantLib is free software: you can redistribute it and/or modify it
+ under the terms of the QuantLib license.  You should have received a
+ copy of the license along with this program; if not, please email
+ <quantlib-dev@lists.sf.net>. The license is also available online at
+ <http://quantlib.org/license.shtml>.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE.  See the license for more details.
+*/
+
+#ifndef quantlib_external_payoff_hpp
+#define quantlib_external_payoff_hpp
+
+#include <ql/experimental/mcbasket/pathpayoff.hpp>
+#include <ql/experimental/mcbasket/pathmultiassetoption.hpp>
+
+namespace QuantLib {
+
+    /*
+      This class allows to implement a PathMultiAssetOption in a foreing language via SWIG.
+      Without, it would be necessary to implement
+
+      virtual boost::shared_ptr<PathPayoff> PathMultiAssetOption::pathPayoff() const;
+
+      in a foreing language.
+      This has proved quite hard for the presence of the shared_ptr.
+     */
+
+    class ExternalOption {
+    public:
+        virtual ~ExternalOption() {}
+	
+        // from PathPayoff
+        virtual void value(const Matrix       & path, 
+                           Array              & payments, 
+                           Array              & exercises, 
+                           std::vector<Array> & states) const = 0;
+        virtual Size basisSystemDimension() const = 0;
+
+        // from PathMultiAssetOption
+        virtual std::vector<Date> fixingDates() const = 0;
+
+        /*
+          This function returns a PathMultiAssetOption,
+          containing a reference to "this".
+          Beware of relative lifetime of "this" and the result.
+
+          The returned instrument is the standard QuantLib version (as a PathMultiAssetOption)
+          of the payoff/option implemented by "this" ExternalOption
+         */
+
+        boost::shared_ptr<Instrument> option() const;
+    };
+    
+ }
+
+#endif
